@import "https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800;900&display=swap";

:root {
    --kb-bg: #ffffff;
    --kb-surface: #ffffff;
    --kb-page-bg: #f8f9fb;
    --kb-heading: #12344d;
    --kb-text: #374151;
    --kb-muted: #6b7280;
    --kb-link: #2563eb;
    --kb-link-hover: #1d4ed8;
    --kb-primary: #1d4ed8;
    --kb-primary-hover: #1e3a8a;
    --kb-icon: #0ea5e9;
    --kb-border: #e5e7eb;
    --kb-header-bg: #000000;
    --kb-header-text: #f3f4f6;
    --kb-header-muted: #9ca3af;
    --kb-header-border: #1f2937;
    --kb-footer-bg: #000000;
    --kb-footer-text: #9ca3af;
    --kb-radius: 8px;
    --kb-max-width: 1200px;
}

html {
    height: 100%;
}

.kb-body {
    margin: 0;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    font-family: "Poppins", sans-serif;
    line-height: 1.6;
    color: var(--kb-text);
    background: var(--kb-page-bg);
}

.kb-header {
    flex-shrink: 0;
    background: var(--kb-header-bg);
    border-bottom: 1px solid var(--kb-header-border);
    position: sticky;
    top: 0;
    z-index: 40;
}

.kb-header-inner {
    max-width: var(--kb-max-width);
    margin: 0 auto;
    padding: 0.875rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.kb-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    flex-shrink: 0;
}

.kb-logo img {
    height: 22px;
    width: auto;
}

.kb-logo img.kb-logo-photographer {
    height: 40px;
    max-width: 220px;
    object-fit: contain;
}

.kb-logo-text {
    color: var(--kb-header-text);
    font-weight: 700;
    font-size: 1.125rem;
    line-height: 1.2;
}

.kb-nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.kb-nav a {
    color: var(--kb-header-text);
    text-decoration: none;
    font-size: 0.9375rem;
}

.kb-nav a:hover {
    color: #ffffff;
}

.kb-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
    flex: 1;
    justify-content: flex-end;
    min-width: 0;
}

.kb-search-form {
    display: flex;
    align-items: center;
    flex: 1;
    max-width: 320px;
    min-width: 160px;
}

.kb-search-input {
    width: 100%;
    border: 1px solid var(--kb-header-border);
    border-radius: 9999px;
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    font-size: 11.7px;
    background: #111827;
    color: var(--kb-header-text);
}

.kb-search-input::placeholder {
    color: var(--kb-header-muted);
}

.kb-search-wrap {
    position: relative;
    width: 100%;
}

.kb-search-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--kb-header-muted);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
}

.kb-search-btn:hover {
    color: var(--kb-header-text);
}

.kb-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--kb-primary);
    color: #fff;
    border: none;
    border-radius: var(--kb-radius);
    padding: 0.5rem 1rem;
    font-size: 11.7px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}

.kb-btn-primary:hover {
    background: var(--kb-primary-hover);
    color: #fff;
}

.kb-btn-header {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.45rem 0.875rem;
    border: 1px solid var(--kb-header-border);
    border-radius: var(--kb-radius);
    background: transparent;
    color: var(--kb-header-text);
    font-size: 11.7px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.kb-btn-header:hover {
    background: #1f2937;
    color: #ffffff;
}

.kb-main {
    flex: 1 0 auto;
    width: 100%;
    max-width: var(--kb-max-width);
    margin: 0 auto;
    padding: 2rem 1.25rem 3rem;
    box-sizing: border-box;
}

.kb-hero-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--kb-heading);
    margin: 0 0 0.5rem;
}

.kb-hero-subtitle {
    color: var(--kb-muted);
    margin: 0 0 2rem;
    font-size: 1rem;
}

.kb-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    font-size: 11.7px;
    margin-bottom: 1.25rem;
    color: var(--kb-muted);
}

.kb-breadcrumb a {
    color: var(--kb-link);
    text-decoration: none;
}

.kb-breadcrumb a:hover {
    text-decoration: underline;
}

.kb-breadcrumb-sep {
    color: var(--kb-muted);
}

.kb-category-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    column-gap: 1rem;
    row-gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: start;
}

@media (min-width: 640px) {
    .kb-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
    .kb-category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1100px) {
    .kb-category-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.kb-category-card {
    display: block;
    background: var(--kb-surface);
    border: 1px solid var(--kb-border);
    border-radius: var(--kb-radius);
    padding: 1.25rem;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, background 0.15s;
    box-sizing: border-box;
}

.kb-category-card:hover {
    border-color: #93c5fd;
    background: #f0f9ff;
}

.kb-category-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--kb-radius);
    background: #e0f2fe;
    color: var(--kb-icon);
    margin-bottom: 0.75rem;
}

.kb-category-icon .iconify {
    width: 1.25rem;
    height: 1.25rem;
}

.kb-category-card h2 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--kb-heading);
    margin: 0 0 0.5rem;
}

.kb-category-card p {
    font-size: 11.7px;
    color: var(--kb-muted);
    margin: 0;
    line-height: 1.5;
}

.kb-page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--kb-heading);
    margin: 0 0 1.5rem;
}

.kb-article-columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 900px) {
    .kb-article-columns {
        grid-template-columns: 1fr 280px;
    }
}

.kb-article-list-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem 2rem;
}

@media (min-width: 768px) {
    .kb-article-list-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.kb-article-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.kb-article-list li {
    margin-bottom: 0.65rem;
}

.kb-article-link {
    display: inline-flex;
    align-items: flex-start;
    gap: 0.5rem;
    color: var(--kb-link);
    text-decoration: none;
    font-size: 0.9375rem;
}

.kb-article-link:hover {
    color: var(--kb-link-hover);
    text-decoration: underline;
}

.kb-article-link .iconify {
    color: var(--kb-icon);
    flex-shrink: 0;
    margin-top: 0.15rem;
}

.kb-article-meta {
    font-size: 11.7px;
    color: var(--kb-muted);
    margin-bottom: 1.5rem;
}

.kb-article-body {
    font-size: 1rem;
    line-height: 1.7;
}

.kb-article-body h2,
.kb-article-body h3 {
    color: var(--kb-heading);
    margin-top: 1.5rem;
}

.kb-article-body p {
    margin: 0 0 1rem;
}

.kb-article-body ul,
.kb-article-body ol {
    margin: 0 0 1rem 1.25rem;
    padding: 0;
}

.kb-article-body li {
    margin-bottom: 0.35rem;
}

.kb-article-body code {
    font-size: 0.9em;
    background: #f3f4f6;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
}

.kb-callout {
    background: #f8fafc;
    border: 1px solid var(--kb-border);
    border-left: 4px solid var(--kb-primary);
    border-radius: var(--kb-radius);
    padding: 0.875rem 1rem;
    margin: 1rem 0 1.25rem;
}

.kb-callout-tip {
    border-left-color: #0ea5e9;
    background: #f0f9ff;
}

.kb-article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.kb-article-body th,
.kb-article-body td {
    border: 1px solid var(--kb-border);
    padding: 0.5rem 0.75rem;
    text-align: left;
}

.kb-sidebar {
    position: sticky;
    top: 5rem;
    align-self: start;
}

.kb-sidebar-section {
    margin-bottom: 1.5rem;
}

.kb-sidebar-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--kb-heading);
    margin: 0 0 0.75rem;
}

.kb-sidebar-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.kb-sidebar-list li {
    margin-bottom: 0.5rem;
}

.kb-sidebar-list a {
    color: var(--kb-link);
    text-decoration: none;
    font-size: 11.7px;
}

.kb-sidebar-list a:hover {
    text-decoration: underline;
}

.kb-sidebar-list .kb-toc-h3 {
    padding-left: 0.75rem;
}

.kb-empty {
    background: var(--kb-surface);
    border: 1px solid var(--kb-border);
    border-radius: var(--kb-radius);
    padding: 2rem;
    text-align: center;
    color: var(--kb-muted);
}

.kb-preview-banner {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    color: #92400e;
    border-radius: var(--kb-radius);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-size: 11.7px;
}

.kb-footer {
    flex-shrink: 0;
    border-top: 1px solid var(--kb-header-border);
    background: var(--kb-footer-bg);
    padding: 1.5rem 1.25rem;
    text-align: center;
    font-size: 0.8125rem;
    color: var(--kb-footer-text);
}

.kb-mobile-toggle {
    display: none;
    background: none;
    border: 1px solid var(--kb-header-border);
    border-radius: var(--kb-radius);
    padding: 0.35rem 0.5rem;
    cursor: pointer;
    color: var(--kb-header-text);
}

@media (max-width: 768px) {
    .kb-nav { display: none; }
    .kb-nav.kb-nav-open {
        display: flex;
        flex-direction: column;
        width: 100%;
        order: 10;
    }
    .kb-mobile-toggle { display: inline-flex; }
    .kb-header-inner { gap: 0.75rem; }
    .kb-header-actions {
        flex-wrap: wrap;
        width: 100%;
    }
    .kb-search-form { max-width: none; flex: 1 1 100%; }
}
