/* ═══════════════════════════════════════════════════════════════════
   KUZNYA THEME — Документация
   ═══════════════════════════════════════════════════════════════════ */

/* ═══ ВИТРИНА /docs/ ═══ */
.docs-search {
    position: relative;
    max-width: 560px;
    margin-top: 24px;
}
.docs-search i.fa-search {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
    pointer-events: none;
}
.docs-search input {
    width: 100%;
    padding: 14px 44px 14px 44px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    transition: border-color .15s, box-shadow .15s;
}
.docs-search input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}
.docs-search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    width: 24px; height: 24px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    transition: all .15s;
}
.docs-search-clear:hover { color: var(--primary); background: rgba(var(--primary-rgb), .1); }

.docs-home-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
}
.docs-home-section {
    padding: 28px 30px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: border-color .2s;
}
.docs-home-section:hover {
    border-color: rgba(var(--primary-rgb), 0.3);
}
.docs-home-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.docs-home-icon {
    display: flex; align-items: center; justify-content: center;
    width: 48px; height: 48px;
    border-radius: 12px;
    background: rgba(var(--primary-rgb), 0.12);
    color: var(--primary-light);
    font-size: 20px;
    flex-shrink: 0;
}
.docs-home-head-text { flex: 1; }
.docs-home-head-text h2 {
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 3px;
}
.docs-home-count {
    font-size: 12.5px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}
.docs-home-list { list-style: none; }
.docs-home-list li { margin-bottom: 4px; }
.docs-home-list a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 9px;
    font-size: 14.5px;
    color: var(--text);
    transition: all .15s;
}
.docs-home-list a:hover {
    background: rgba(var(--primary-rgb), 0.08);
    color: var(--primary-light);
    padding-left: 16px;
}
.docs-home-list a i:first-child {
    color: var(--text-muted);
    font-size: 12px;
    flex-shrink: 0;
}
.docs-home-list a:hover i:first-child { color: var(--primary); }
.docs-home-list a span { flex: 1; }
.docs-home-arrow {
    color: var(--text-muted);
    font-size: 11px;
    opacity: 0;
    transition: all .15s;
}
.docs-home-list a:hover .docs-home-arrow {
    opacity: 1;
    transform: translateX(4px);
    color: var(--primary);
}
.docs-home-empty {
    font-size: 14px;
    color: var(--text-muted);
    font-style: italic;
    padding: 12px 0;
}

.docs-search-info {
    padding: 14px 20px;
    border-radius: 10px;
    background: rgba(var(--primary-rgb), 0.06);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    margin-bottom: 28px;
    font-size: 14.5px;
    color: var(--text);
}
.docs-search-info i { color: var(--primary); margin-right: 8px; }

/* ═══ СТАТЬЯ /docs/slug/ ═══ */
.docs-layout { padding-top: 40px; }

.docs-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 48px;
    align-items: start;
}

.docs-sidebar {
    position: sticky;
    top: 90px;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    padding-right: 8px;
}
.docs-sidebar::-webkit-scrollbar { width: 4px; }
.docs-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 2px; }

.docs-sidebar-group { margin-bottom: 28px; }
.docs-sidebar-title {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 12px;
    padding-left: 12px;
}
.docs-sidebar-list { list-style: none; }
.docs-sidebar-list li { margin-bottom: 2px; }
.docs-sidebar-link {
    display: block;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.4;
    transition: all .15s;
    border-left: 2px solid transparent;
}
.docs-sidebar-link:hover {
    color: var(--text);
    background: rgba(255,255,255,.03);
}
.docs-sidebar-link.active {
    color: var(--primary-light);
    background: rgba(var(--primary-rgb), 0.1);
    border-left-color: var(--primary);
    font-weight: 600;
}

.docs-article {
    max-width: 780px;
    min-width: 0;
}
.docs-article-head {
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.docs-article-head h1 {
    font-size: clamp(28px, 3.5vw, 40px);
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: 14px;
    line-height: 1.15;
}
.docs-article-lead {
    font-size: 17px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Типографика статьи — переиспользует .page-content, но чуть плотнее */
.docs-content {
    font-size: 16px;
    line-height: 1.75;
    color: var(--text-muted);
}
.docs-content h2 {
    font-size: 25px;
    color: var(--text);
    margin: 44px 0 18px;
    letter-spacing: -0.02em;
    line-height: 1.2;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.docs-content h3 {
    font-size: 19px;
    color: var(--text);
    margin: 32px 0 14px;
    letter-spacing: -0.01em;
}
.docs-content p { margin-bottom: 18px; }
.docs-content strong { color: var(--text); font-weight: 600; }
.docs-content em { color: var(--primary-light); font-style: normal; font-weight: 500; }
.docs-content a {
    color: var(--primary-light);
    text-decoration: underline;
    text-decoration-color: rgba(var(--primary-rgb), .35);
    text-underline-offset: 3px;
    transition: text-decoration-color .15s;
}
.docs-content a:hover { text-decoration-color: var(--primary-light); }
.docs-content ul, .docs-content ol {
    margin: 18px 0 24px 22px;
}
.docs-content li { margin-bottom: 10px; }
.docs-content li::marker { color: var(--primary); }
.docs-content code {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    background: rgba(0,0,0,.4);
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 13.5px;
    color: var(--primary-light);
    border: 1px solid rgba(255,255,255,.04);
}
.docs-content pre {
    background: #0a0a10;
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 10px;
    padding: 18px 20px;
    overflow-x: auto;
    margin: 20px 0;
    font-size: 13.5px;
    line-height: 1.6;
}
.docs-content pre code {
    background: none;
    border: none;
    padding: 0;
    color: #E0E0E0;
}
.docs-content blockquote {
    border-left: 3px solid var(--primary);
    padding: 6px 0 6px 20px;
    margin: 24px 0;
    color: var(--text-muted);
    font-style: italic;
}
.docs-content hr {
    border: none;
    border-top: 1px solid rgba(255,255,255,.08);
    margin: 40px 0;
}
.docs-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 24px 0;
}
.docs-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 15px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.06);
}
.docs-content table th, .docs-content table td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,.05);
    text-align: left;
}
.docs-content table th {
    color: var(--text);
    font-weight: 600;
    background: rgba(255,255,255,.03);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.docs-content table tr:last-child td { border-bottom: none; }

/* Prev / Next */
.docs-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 60px;
    padding-top: 32px;
    border-top: 1px solid rgba(255,255,255,.06);
}
.docs-nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 12px;
    background: rgba(255,255,255,.02);
    border: 1px solid rgba(255,255,255,.06);
    text-decoration: none;
    transition: all .2s;
    color: inherit;
}
.docs-nav-item:hover {
    border-color: rgba(var(--primary-rgb), .4);
    background: rgba(var(--primary-rgb), .04);
    color: inherit;
}
.docs-nav-item i {
    color: var(--primary);
    font-size: 14px;
    flex-shrink: 0;
}
.docs-nav-item div {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.docs-nav-item span {
    font-size: 11.5px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}
.docs-nav-item strong {
    font-size: 14.5px;
    color: var(--text);
    font-weight: 600;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}
.docs-nav-next { text-align: right; }
.docs-nav-next div { align-items: flex-end; text-align: right; }

/* Compact page-hero для статьи */
.page-hero-compact { padding: 32px 0 24px; }
.page-hero-compact .page-title { font-size: clamp(24px, 3vw, 32px); }

/* ═══ АДАПТИВ ═══ */
@media (max-width: 1000px) {
    .docs-wrapper { grid-template-columns: 1fr; gap: 32px; }
    .docs-sidebar {
        position: static;
        max-height: none;
        padding: 20px;
        background: rgba(255,255,255,.02);
        border-radius: 12px;
        border: 1px solid rgba(255,255,255,.06);
    }
    .docs-home-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .docs-nav { grid-template-columns: 1fr; }
    .docs-nav-next { text-align: left; }
    .docs-nav-next div { align-items: flex-start; text-align: left; }
}