/* ============================================================
   PayOk Knowledge Base – Styles
   Brand primary: #9629e6
   ============================================================ */

/* ── Hero / Search ─────────────────────────────────────────── */
.kb-hero {
    background: linear-gradient(135deg, #9629e6 0%, #4f1fc1 100%);
    padding: 80px 20px 70px;
    text-align: center;
    color: #fff;
}

.kb-hero__title {
    font-size: 2.6rem;
    font-weight: 800;
    margin-bottom: 12px;
    color: #fff;
    letter-spacing: -0.5px;
}

.kb-hero__subtitle {
    font-size: 1.05rem;
    color: rgba(255,255,255,.75);
    margin-bottom: 36px;
}

.kb-search-form__wrap {
    position: relative;
    max-width: 640px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 50px;
    box-shadow: 0 8px 32px rgba(0,0,0,.22);
    overflow: hidden;
}

.kb-search-form__icon {
    position: absolute;
    left: 22px;
    color: #9629e6;
    font-size: 1rem;
    pointer-events: none;
}

.kb-search-form__input {
    flex: 1;
    border: none;
    outline: none;
    padding: 18px 20px 18px 52px;
    font-size: 1rem;
    color: #333;
    background: transparent;
}

.kb-search-form__input::placeholder { color: #bbb; }

.kb-search-form__btn {
    background: #9629e6;
    color: #fff;
    border: none;
    padding: 18px 32px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.kb-search-form__btn:hover { background: #5521c8; }

/* ── Section headings ──────────────────────────────────────── */
.kb-section-heading {
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.kb-section-heading i { color: #f39c12; font-size: 1rem; }

/* ── Recent articles (home) ─────────────────────────────────── */
.kb-recent-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.kb-recent-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border: 1px solid #eee;
    border-radius: 10px;
    background: #fff;
    text-decoration: none;
    color: #2c2c54;
    font-size: 0.92rem;
    font-weight: 500;
    transition: all .2s;
    gap: 14px;
}

.kb-recent-item:hover {
    border-color: #c9b6f7;
    color: #9629e6;
    box-shadow: 0 4px 18px rgba(103,48,227,.1);
    text-decoration: none;
}

.kb-recent-item__title { flex: 1; min-width: 0; line-height: 1.4; }

.kb-recent-item__arrow {
    color: #ddd;
    font-size: 0.75rem;
    flex-shrink: 0;
    transition: color .2s;
}

.kb-recent-item:hover .kb-recent-item__arrow { color: #9629e6; }

/* ── Shared container ───────────────────────────────────────── */
.kb-container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 52px 24px;
}

/* ── Hero inner wrapper ─────────────────────────────────────── */
.kb-hero__inner {
    max-width: 700px;
    margin: 0 auto;
}

/* ── Recent section background ──────────────────────────────── */
.kb-recent { background: #fff; border-bottom: 1px solid #f0eef8; }

/* ── Categories home section ────────────────────────────────── */
.kb-categories-home { background: #f8f6fc; }

/* ── Category cards grid ────────────────────────────────────── */
.kb-cat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

/* ── Category card (Crisp-style horizontal) ─────────────────── */
.kb-cat-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 18px 22px;
    border: 1px solid #e8e6f0;
    border-radius: 14px;
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .2s, transform .2s, border-color .2s;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
}

.kb-cat-card:hover {
    box-shadow: 0 8px 32px rgba(103,48,227,.14);
    transform: translateY(-3px);
    border-color: #c9b6f7;
    text-decoration: none;
    color: inherit;
}

.kb-cat-card--demo { opacity: .82; }

/* Image / icon container */
.kb-cat-card__img {
    width: 88px;
    height: 68px;
    border-radius: 10px;
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kb-cat-card__img--icon { font-size: 2rem; color: #fff; }

.kb-cat-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Right content */
.kb-cat-card__content { flex: 1; min-width: 0; }

.kb-cat-card__badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
    letter-spacing: 0.02em;
}

.kb-cat-card__desc {
    font-size: 0.86rem;
    color: #666;
    margin: 0 0 8px;
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.kb-cat-card__count {
    font-size: 0.78rem;
    color: #aaa;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 8-color palette for category cards */
.kb-c-0 { background: linear-gradient(135deg, #9629e6 0%, #9061f9 100%); }
.kb-c-1 { background: linear-gradient(135deg, #2980b9 0%, #6dd5fa 100%); }
.kb-c-2 { background: linear-gradient(135deg, #00b894 0%, #55efc4 100%); }
.kb-c-3 { background: linear-gradient(135deg, #e67e22 0%, #f9ca24 100%); }
.kb-c-4 { background: linear-gradient(135deg, #e74c3c 0%, #ff7675 100%); }
.kb-c-5 { background: linear-gradient(135deg, #8e44ad 0%, #c39bd3 100%); }
.kb-c-6 { background: linear-gradient(135deg, #1abc9c 0%, #78e8c9 100%); }
.kb-c-7 { background: linear-gradient(135deg, #34495e 0%, #636e72 100%); }

.kb-b-0 { background: #9629e6; }
.kb-b-1 { background: #2980b9; }
.kb-b-2 { background: #00b894; }
.kb-b-3 { background: #e67e22; }
.kb-b-4 { background: #e74c3c; }
.kb-b-5 { background: #8e44ad; }
.kb-b-6 { background: #1abc9c; }
.kb-b-7 { background: #34495e; }

/* ── Layout: sidebar + main ────────────────────────────────── */
.kb-layout {
    display: flex;
    gap: 48px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 50px 20px;
    align-items: flex-start;
}

/* ── Sidebar ───────────────────────────────────────────────── */
.kb-sidebar {
    width: 240px;
    flex-shrink: 0;
    position: sticky;
    top: 90px;
}

.kb-sidebar__title {
    font-size: 12px !important;
    font-weight: 600 !important;
    font-family: 'Montserrat', sans-serif !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    color: #9629e6 !important;
    margin: 0 0 10px !important;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.kb-sidebar__list { list-style: none; margin: 0; padding: 0; }

.kb-sidebar__item a {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 0.88rem;
    color: #555;
    text-decoration: none;
    transition: background .15s, color .15s;
    line-height: 1.4;
}

.kb-sidebar__item a i {
    width: 16px;
    text-align: center;
    color: #bbb;
    font-size: 0.82rem;
    flex-shrink: 0;
}

.kb-sidebar__item a:hover { background: #f3edff; color: #9629e6; }
.kb-sidebar__item a:hover i { color: #9629e6; }

.kb-sidebar__item--active > a {
    background: #ede7ff;
    color: #9629e6;
    font-weight: 600;
}

.kb-sidebar__item--active > a i { color: #9629e6; }

/* ── Main content area ─────────────────────────────────────── */
.kb-main { flex: 1; min-width: 0; }

/* ── Breadcrumb ────────────────────────────────────────────── */
.kb-breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0 0 28px;
    gap: 6px;
    font-size: 0.84rem;
    color: #aaa;
}

.kb-breadcrumb ol li + li::before {
    content: '›';
    margin-right: 6px;
    color: #ddd;
}

.kb-breadcrumb ol li a { color: #9629e6; text-decoration: none; }
.kb-breadcrumb ol li a:hover { text-decoration: underline; }
.kb-breadcrumb ol li.active { color: #666; }

/* ── Category header ───────────────────────────────────────── */
.kb-cat-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 36px;
    padding-bottom: 24px;
    border-bottom: 2px solid #f0e8ff;
}

.kb-cat-header__icon {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    background: linear-gradient(135deg, #9629e6, #9061f9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(103,48,227,.25);
}

.kb-cat-header__title {
    font-size: 1.9rem;
    font-weight: 700;
    margin: 0 0 4px;
    color: #1a1a2e;
}

.kb-cat-header__desc { color: #777; margin: 0; font-size: 0.95rem; }

/* ── Section block ─────────────────────────────────────────── */
.kb-section-block { margin-bottom: 36px; }

.kb-section-block__title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #aaa;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

/* ── Article list ──────────────────────────────────────────── */
.kb-article-list { list-style: none; margin: 0; padding: 0; }

.kb-article-list__item {
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 8px;
    transition: box-shadow .2s, border-color .2s;
    background: #fff;
}

.kb-article-list__item:hover {
    box-shadow: 0 4px 18px rgba(103,48,227,.1);
    border-color: #c9b6f7;
}

.kb-article-list__link {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.94rem;
    font-weight: 600;
    color: #2c2c54;
    text-decoration: none;
}

.kb-article-list__link i { color: #9629e6; font-size: 0.88rem; }
.kb-article-list__link:hover { color: #9629e6; text-decoration: none; }

.kb-article-list__excerpt {
    color: #888;
    font-size: 0.84rem;
    margin: 6px 0 0 26px;
    line-height: 1.5;
}

/* ── Article ───────────────────────────────────────────────── */
.kb-article__header {
    margin-bottom: 32px;
    padding-bottom: 22px;
    border-bottom: 2px solid #f0e8ff;
}

.kb-article__title {
    font-size: 2rem;
    font-weight: 800;
    color: #1a1a2e;
    margin-bottom: 10px;
    line-height: 1.25;
    letter-spacing: -0.3px;
}

.kb-article__meta { font-size: 0.84rem; color: #9ca3af; margin: 0; }
.kb-article__meta i { margin-right: 4px; color: #c4b5fd; }

.kb-article__content {
    font-size: 1rem;
    line-height: 1.8;
    color: #444;
}

.kb-article__content h2 {
    font-size: 36px;
    font-weight: 700;
    margin: 36px 0 14px;
    color: #1a1a2e;
}

.kb-article__content h3 {
    font-size: 26px;
    font-weight: 600;
    margin: 26px 0 10px;
    color: #2c2c54;
}

.kb-article__content a { color: #9629e6; }
.kb-article__content a:hover { text-decoration: underline; }

.kb-article__content ul,
.kb-article__content ol {
    padding-left: 22px;
    margin-bottom: 16px;
}

.kb-article__content li { margin-bottom: 6px; }

.kb-article__content pre,
.kb-article__content code {
    background: #f5f2ff;
    border-radius: 6px;
    font-size: 0.88rem;
}

.kb-article__content pre {
    padding: 14px 18px;
    overflow-x: auto;
    margin-bottom: 16px;
}

.kb-article__content code { padding: 2px 6px; }

.kb-article__content img {
    max-width: 100%;
    border-radius: 8px;
    margin: 8px 0;
}

.kb-article__content blockquote {
    border-left: 4px solid #9629e6;
    padding: 10px 18px;
    margin: 16px 0;
    background: #f9f6ff;
    border-radius: 0 8px 8px 0;
    color: #555;
}

/* ── Helpful buttons ───────────────────────────────────────── */
.kb-helpful {
    margin-top: 52px;
    padding: 30px 36px;
    background: #f9f6ff;
    border: 1px solid #ede4ff;
    border-radius: 16px;
    text-align: center;
}

.kb-helpful__question {
    font-size: 1.05rem;
    font-weight: 700;
    color: #2c2c54;
    margin-bottom: 18px;
}

.kb-helpful__buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.kb-helpful__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 26px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
    border: 2px solid transparent;
}

.kb-helpful__btn--yes {
    background: #9629e6;
    color: #fff;
    border-color: #9629e6;
}

.kb-helpful__btn--yes:hover { background: #5521c8; border-color: #5521c8; }

.kb-helpful__btn--no {
    background: #fff;
    color: #9629e6;
    border-color: #9629e6;
}

.kb-helpful__btn--no:hover { background: #f3edff; }

.kb-helpful__stats {
    font-size: 0.82rem;
    color: #bbb;
    margin: 16px 0 0;
}

.kb-voted-msg {
    font-size: 1rem;
    color: #9629e6;
    font-weight: 600;
    margin: 0;
}

/* ── Back / nav buttons ────────────────────────────────────── */
.kb-article__nav { margin-top: 36px; }

.kb-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #9629e6;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity .2s;
}

.kb-back-btn:hover { opacity: 0.7; text-decoration: none; color: #9629e6; }

/* ── Search results ────────────────────────────────────────── */
.kb-search-results {
    max-width: 820px;
    margin: 0 auto;
    padding: 50px 20px;
}

.kb-search-results__summary {
    font-size: 1rem;
    color: #666;
    margin-bottom: 28px;
}

.kb-result-list { list-style: none; padding: 0; margin: 0; }

.kb-result-list__item {
    border-bottom: 1px solid #eee;
    padding: 22px 0;
}

.kb-result-list__title {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: #2c2c54;
    text-decoration: none;
    margin-bottom: 5px;
    transition: color .2s;
}

.kb-result-list__title:hover { color: #9629e6; text-decoration: none; }

.kb-result-list__cat {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    color: #999;
    margin-bottom: 7px;
}

.kb-result-list__excerpt { font-size: 0.88rem; color: #777; margin: 0; }

.kb-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #ccc;
}

.kb-no-results i { font-size: 3rem; display: block; margin-bottom: 16px; }

/* ── Utilities ─────────────────────────────────────────────── */
.ptb-60 { padding-top: 60px; padding-bottom: 60px; }
.ptb-40 { padding-top: 40px; padding-bottom: 40px; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 992px) {
    .kb-cat-grid { grid-template-columns: 1fr; gap: 14px; }
}

@media (max-width: 768px) {
    .kb-hero { padding: 56px 20px 50px; }
    .kb-hero__title { font-size: 1.8rem; }
    .kb-hero__subtitle { font-size: 0.92rem; }

    .kb-container { padding: 32px 16px; }

    .kb-layout { flex-direction: column; padding: 28px 16px; gap: 28px; }
    .kb-sidebar { width: 100%; position: static; }

    .kb-cat-grid { grid-template-columns: 1fr; gap: 12px; }
    .kb-recent-grid { grid-template-columns: 1fr; gap: 8px; }

    .kb-cat-card { padding: 14px 16px; gap: 14px; }
    .kb-cat-card__img { width: 64px; height: 52px; font-size: 1.5rem; }

    .kb-article__title { font-size: 1.5rem; }
    .kb-helpful { padding: 22px 20px; }
    .kb-cat-header { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
    .kb-search-form__btn {
        padding: 14px 18px;
        font-size: 0.85rem;
    }

    .kb-cat-card { gap: 12px; padding: 12px 14px; }
    .kb-cat-card__img { width: 54px; height: 44px; border-radius: 8px; font-size: 1.25rem; }
    .kb-cat-card__desc { display: none; }
}
