/* Банк знаний — сетка карточек как на stellazhkomplect.ru/bank-znanij */

.kb-page {
    padding-top: 28px;
    padding-bottom: 72px;
    background:
        radial-gradient(900px 420px at 8% -10%, rgba(17, 133, 216, 0.08), transparent 60%),
        radial-gradient(700px 360px at 92% 0%, rgba(17, 133, 216, 0.05), transparent 55%),
        #f7f8fa;
}

/* Match header / kb-article gutters (20px each side); keeps max-width centering on desktop */
.kb-page .container {
    width: min(1480px, calc(100% - 40px));
    max-width: none;
}

.kb-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    font-size: 0.9rem;
    color: #94a3b8;
}

.kb-breadcrumb a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s ease;
}

.kb-breadcrumb a:hover {
    color: #1185d8;
}

.kb-page__title {
    margin-bottom: 10px;
}

.kb-page__lead {
    max-width: 720px;
    margin: 0 0 32px;
    color: #64748b;
    font-size: 1.05rem;
    line-height: 1.55;
}

.kb-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.kb-card {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    padding: 18px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.kb-card:hover {
    transform: translateY(-3px);
    border-color: rgba(17, 133, 216, 0.22);
    box-shadow: 0 18px 36px rgba(17, 133, 216, 0.12);
}

.kb-card__media {
    overflow: hidden;
    border-radius: 14px;
    background: #eef2f7;
    aspect-ratio: 1 / 1;
}

.kb-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.kb-card:hover .kb-card__media img {
    transform: scale(1.04);
}

.kb-card__body {
    min-width: 0;
    padding-top: 4px;
}

.kb-card__title {
    margin: 0 0 12px;
    color: #111827;
    font-family: Play, sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
}

.kb-card__links {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.kb-card__links a {
    display: inline-block;
    color: #1185d8;
    font-size: 0.95rem;
    line-height: 1.4;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.kb-card__links a:hover {
    color: #0e74be;
    border-bottom-color: rgba(14, 116, 190, 0.35);
}

@media (max-width: 980px) {
    .kb-grid {
        grid-template-columns: 1fr;
    }

    .kb-card {
        grid-template-columns: 140px minmax(0, 1fr);
    }
}

@media (max-width: 640px) {
    .kb-page {
        padding-top: 18px;
        padding-bottom: 48px;
    }

    .kb-card {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 14px;
    }

    .kb-card__media {
        max-width: 220px;
    }
}

/* Документы банка знаний */

.kb-article {
    padding-top: 28px;
    padding-bottom: 72px;
    background:
        radial-gradient(900px 420px at 8% -10%, rgba(17, 133, 216, 0.07), transparent 60%),
        #f7f8fa;
}

.kb-article .container {
    width: min(1480px, calc(100% - 40px));
    max-width: none;
}

.kb-docs__intro {
    margin: 0 0 24px;
    color: #64748b;
    font-size: 1.05rem;
    line-height: 1.55;
}

.kb-docs__empty {
    padding: 28px;
    border-radius: 16px;
    background: #fff;
    color: #64748b;
    border: 1px dashed rgba(15, 23, 42, 0.12);
}

.kb-docs__list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.kb-doc {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 16px 18px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.kb-doc:hover {
    border-color: rgba(17, 133, 216, 0.22);
    box-shadow: 0 14px 28px rgba(17, 133, 216, 0.1);
    transform: translateY(-1px);
}

.kb-doc__icon {
    width: 54px;
    height: 64px;
    display: grid;
    place-content: center;
    gap: 4px;
    border-radius: 10px;
    background: linear-gradient(180deg, #e8f4fc, #d7ecf9);
    color: #1185d8;
    font-size: 1.25rem;
}

.kb-doc__icon span {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.kb-doc__body h2 {
    margin: 0;
    color: #111827;
    font-family: Play, sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
}

.kb-doc__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.kb-doc__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 10px;
    background: #1185d8;
    color: #fff !important;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none !important;
    border-bottom: 0 !important;
    transition: background 0.2s ease;
}

.kb-doc__btn:hover {
    background: #0e74be;
    color: #fff !important;
}

.kb-doc__btn--ghost {
    background: #eef6fc;
    color: #1185d8 !important;
}

.kb-doc__btn--ghost:hover {
    background: #dceefb;
    color: #0e74be !important;
}

@media (max-width: 720px) {
    .kb-doc {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .kb-doc__actions {
        grid-column: 1 / -1;
        justify-content: stretch;
    }

    .kb-doc__btn {
        flex: 1;
    }
}
