/* Knowledgebase (/kb, /kb/category/{slug}, /kb/{slug}) */

.ht-kb-hero,
.ht-kb,
.ht-kb-help {
    --ht-ink: #0f2341;
    --ht-muted: #5b6678;
    --ht-border: #e7ecf2;
    --ht-teal: var(--color-primary, #135360);
    --ht-teal-dark: var(--color-secondary, #0e404a);
    --ht-teal-light: var(--tier_teal, #27abb8);
    font-family: var(--font-primary);
}

/* ---- Hero with search ---- */
.ht-kb-hero {
    position: relative;
    z-index: 2;
    padding: 76px 0 64px;
    background:
        radial-gradient(circle at 15% 20%, rgba(39, 171, 184, 0.16), transparent 42%),
        radial-gradient(circle at 85% 0%, rgba(255, 193, 7, 0.12), transparent 38%),
        linear-gradient(180deg, #eaf5f6 0%, #f6fafb 100%);
    text-align: center;
}

.ht-kb-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(19, 83, 96, 0.08);
    color: var(--ht-teal);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.ht-kb-hero h1 {
    margin: 0 0 12px;
    color: var(--ht-ink);
    font-size: 48px;
    font-weight: 800;
    letter-spacing: -1px;
}

.ht-kb-hero p {
    max-width: 620px;
    margin: 0 auto;
    color: var(--ht-muted);
    font-size: 17px;
    line-height: 1.6;
}

.ht-kb-hero__topics {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    color: var(--ht-muted);
    font-size: 14px;
}

.ht-kb-hero__topics a {
    padding: 5px 12px;
    border: 1px solid var(--ht-border);
    border-radius: 999px;
    background: #fff;
    color: var(--ht-ink);
    font-weight: 500;
    transition: all 0.2s ease;
}

.ht-kb-hero__topics a:hover {
    border-color: var(--ht-teal-light);
    color: var(--ht-teal);
}

/* Category and article pages: smaller, left aligned */
.ht-kb-hero--compact {
    padding: 36px 0 32px;
    text-align: left;
}

.ht-kb-hero--compact .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px 32px;
}

.ht-kb-hero--compact .ht-kb-crumbs {
    flex-basis: 100%;
}

.ht-kb-hero--article .ht-kb-crumbs {
    flex-basis: auto;
}

.ht-kb-hero__title {
    display: flex;
    align-items: center;
    gap: 18px;
}

.ht-kb-hero--compact h1 {
    margin: 0 0 4px;
    font-size: 36px;
}

.ht-kb-hero--compact p {
    margin: 0;
    font-size: 15.5px;
}

.ht-kb-crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
}

.ht-kb-crumbs a {
    color: var(--ht-teal);
}

.ht-kb-crumbs > span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ht-ink);
}

.ht-kb-crumbs i {
    color: #98a2b3;
    font-size: 10px;
}

/* ---- Search box with instant results ---- */
.ht-kb-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 640px;
    margin: 30px auto 0;
    padding: 6px 6px 6px 20px;
    border: 1px solid var(--ht-border);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 14px 36px rgba(15, 35, 65, 0.08);
    text-align: left;
}

.ht-kb-search:focus-within {
    border-color: var(--ht-teal-light);
}

.ht-kb-search > i {
    color: #98a2b3;
}

.ht-kb-search input {
    flex: 1;
    min-width: 0;
    height: 48px;
    border: 0;
    background: none;
    color: var(--ht-ink);
    font-size: 16px;
    outline: none;
}

.ht-kb-search button {
    width: auto;
    height: 48px;
    padding: 0 24px;
    border: 0;
    border-radius: 10px;
    background: var(--ht-teal);
    color: #fff;
    font-weight: 600;
    transition: background 0.2s ease;
}

.ht-kb-search button:hover {
    background: var(--ht-teal-dark);
}

.ht-kb-search--small {
    width: 100%;
    max-width: 440px;
    margin: 0;
    box-shadow: 0 8px 22px rgba(15, 35, 65, 0.06);
}

.ht-kb-search--small input,
.ht-kb-search--small button {
    height: 42px;
    font-size: 15px;
}

.ht-kb-search__results {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    z-index: 20;
    max-height: 420px;
    margin: 0;
    padding: 6px;
    overflow-y: auto;
    border: 1px solid var(--ht-border);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 24px 50px rgba(15, 35, 65, 0.16);
    list-style: none;
}

.ht-kb-search__results a {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--ht-ink);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
}

.ht-kb-search__results a i {
    margin-top: 3px;
    color: var(--ht-teal-light);
}

.ht-kb-search__results a small {
    display: block;
    color: var(--ht-muted);
    font-size: 12.5px;
    font-weight: 500;
}

.ht-kb-search__results a:hover,
.ht-kb-search__results a.is-active {
    background: #eef7f8;
    color: var(--ht-teal);
}

.ht-kb-search__empty {
    padding: 14px;
    color: var(--ht-muted);
    font-size: 14px;
}

/* ---- Sections ---- */
.ht-kb {
    padding: 64px 0 80px;
}

.ht-kb--popular {
    padding-top: 0;
}

.ht-kb--article {
    padding-top: 40px;
}

.ht-kb__narrow {
    max-width: 880px;
}

.ht-kb-section-head {
    margin-bottom: 28px;
}

.ht-kb-section-head h2 {
    margin: 0 0 4px;
    color: var(--ht-ink);
    font-size: 30px;
    font-weight: 800;
}

.ht-kb-section-head p {
    margin: 0;
    color: var(--ht-muted);
}

/* ---- Category cards ---- */
.ht-kb-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.ht-kb-card {
    display: flex;
    flex-direction: column;
    padding: 26px 26px 22px;
    border: 1px solid var(--ht-border);
    border-radius: 18px;
    background: #fff;
    transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.ht-kb-card:hover {
    border-color: #d3e7ea;
    box-shadow: 0 20px 44px rgba(15, 35, 65, 0.09);
    transform: translateY(-2px);
}

.ht-kb-card__head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.ht-kb-card__head h3 {
    margin: 0;
    color: var(--ht-ink);
    font-size: 19px;
    font-weight: 700;
}

.ht-kb-card__head small {
    color: var(--ht-muted);
    font-size: 13px;
}

.ht-kb-card__head:hover h3 {
    color: var(--ht-teal);
}

.ht-kb-card__icon {
    display: inline-flex;
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #135360 0%, #27abb8 100%);
    color: #fff;
    font-size: 20px;
}

.ht-kb-card__icon--lg {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    font-size: 26px;
}

.ht-kb-card__desc {
    margin: -6px 0 14px;
    color: var(--ht-muted);
    font-size: 14.5px;
    line-height: 1.55;
}

.ht-kb-card ul {
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
}

.ht-kb-card li a {
    display: flex;
    gap: 10px;
    padding: 7px 0;
    color: #344054;
    font-size: 15px;
    line-height: 1.45;
}

.ht-kb-card li a i {
    margin-top: 3px;
    color: #98a2b3;
    font-size: 14px;
}

.ht-kb-card li a:hover {
    color: var(--ht-teal);
}

.ht-kb-card li a:hover i {
    color: var(--ht-teal-light);
}

.ht-kb-card__empty {
    margin: 0 0 16px;
    color: #98a2b3;
    font-size: 14.5px;
}

.ht-kb-card__more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--ht-border);
    color: var(--ht-teal);
    font-size: 14.5px;
    font-weight: 700;
}

.ht-kb-card__more i {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.ht-kb-card__more:hover i {
    transform: translateX(3px);
}

/* ---- Article rows (search results, category, popular) ---- */
.ht-kb-list {
    display: grid;
    gap: 12px;
}

.ht-kb-list--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ht-kb-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 22px;
    border: 1px solid var(--ht-border);
    border-radius: 14px;
    background: #fff;
    transition: all 0.2s ease;
}

.ht-kb-row > i:first-child {
    display: inline-flex;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #eef7f8;
    color: var(--ht-teal);
}

.ht-kb-row__text {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.ht-kb-row__text strong {
    color: var(--ht-ink);
    font-size: 16.5px;
    line-height: 1.4;
}

.ht-kb-row__text > span {
    display: -webkit-box;
    overflow: hidden;
    color: var(--ht-muted);
    font-size: 14.5px;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.ht-kb-row__text small {
    color: #8a94a6;
    font-size: 13px;
}

.ht-kb-row__arrow {
    align-self: center;
    color: #c0c8d4;
    transition: transform 0.2s ease, color 0.2s ease;
}

.ht-kb-row:hover {
    border-color: var(--ht-teal-light);
    box-shadow: 0 12px 28px rgba(15, 35, 65, 0.07);
}

.ht-kb-row:hover strong,
.ht-kb-row:hover .ht-kb-row__arrow {
    color: var(--ht-teal);
}

.ht-kb-row:hover .ht-kb-row__arrow {
    transform: translateX(3px);
}

.ht-kb-results__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.ht-kb-results__head h2 {
    margin: 0;
    color: var(--ht-ink);
    font-size: 24px;
    font-weight: 700;
}

.ht-kb-results__head a {
    color: var(--ht-teal);
    font-weight: 600;
}

.ht-kb-empty {
    padding: 56px 24px;
    border: 1px dashed #cfd8e0;
    border-radius: 18px;
    background: #fff;
    text-align: center;
}

.ht-kb-empty > i {
    color: var(--ht-teal-light);
    font-size: 40px;
}

.ht-kb-empty h3 {
    margin: 16px 0 8px;
    color: var(--ht-ink);
    font-size: 22px;
    font-weight: 700;
}

.ht-kb-empty p {
    max-width: 460px;
    margin: 0 auto 20px;
    color: var(--ht-muted);
}

/* ---- Sidebar layout (category and article pages) ---- */
.ht-kb-layout {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 32px;
    align-items: start;
}

.ht-kb-sidebar {
    position: sticky;
    top: 110px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.ht-kb-sidebar__box {
    padding: 20px 14px 14px;
    border: 1px solid var(--ht-border);
    border-radius: 16px;
    background: #fff;
}

.ht-kb-sidebar__box h2 {
    margin: 0 8px 10px;
    color: #8a94a6;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.ht-kb-sidebar__box ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ht-kb-sidebar__scroll {
    position: relative;
    max-height: 300px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.ht-kb-sidebar__box a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 10px;
    color: #344054;
    font-size: 14.5px;
    line-height: 1.4;
}

.ht-kb-sidebar__box a i {
    width: 18px;
    color: #98a2b3;
    text-align: center;
}

.ht-kb-sidebar__box a span {
    flex: 1;
}

.ht-kb-sidebar__box a small {
    padding: 1px 8px;
    border-radius: 999px;
    background: #f1f4f7;
    color: var(--ht-muted);
    font-size: 12px;
}

.ht-kb-sidebar__box a:hover {
    background: #f4f9fa;
    color: var(--ht-teal);
}

.ht-kb-sidebar__box a.is-active {
    background: #eaf6f7;
    color: var(--ht-teal);
    font-weight: 600;
}

.ht-kb-sidebar__box a.is-active i {
    color: var(--ht-teal-light);
}

/* ---- Article ---- */
.ht-kb-article {
    padding: 40px 48px 32px;
    border: 1px solid var(--ht-border);
    border-radius: 20px;
    background: #fff;
}

.ht-kb-article header {
    margin-bottom: 28px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--ht-border);
}

.ht-kb-article__category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    padding: 5px 12px;
    border-radius: 8px;
    background: #eaf6f7;
    color: var(--ht-teal);
    font-size: 13px;
    font-weight: 700;
}

.ht-kb-article h1 {
    margin: 0 0 10px;
    color: var(--ht-ink);
    font-size: 34px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.5px;
}

.ht-kb-article__meta {
    margin: 0;
    color: var(--ht-muted);
    font-size: 14px;
}

.ht-kb-article__meta i {
    margin-right: 4px;
    color: var(--ht-teal-light);
}

.ht-kb-article__body {
    max-width: none;
    font-size: 16.5px;
}

/* Screenshots: framed so white panels stand out from the page */
.ht-kb-article__body img {
    margin: 6px 0;
    border: 1px solid var(--ht-border);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(15, 35, 65, 0.06);
}

.ht-kb-feedback {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 36px;
    padding: 18px 22px;
    border-radius: 14px;
    background: #f4f9fa;
}

.ht-kb-feedback span {
    color: var(--ht-ink);
    font-weight: 700;
}

.ht-kb-feedback div {
    display: flex;
    gap: 10px;
}

.ht-kb-feedback button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: auto;
    padding: 9px 18px;
    border: 1px solid #cfe3e6;
    border-radius: 10px;
    background: #fff;
    color: var(--ht-teal);
    font-weight: 600;
    transition: all 0.2s ease;
}

.ht-kb-feedback button:hover:not(:disabled) {
    border-color: var(--ht-teal);
    background: var(--ht-teal);
    color: #fff;
}

.ht-kb-feedback p {
    margin: 0;
    color: var(--ht-teal);
    font-weight: 600;
}

.ht-kb-feedback p i {
    margin-right: 6px;
}

.ht-kb-pager {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.ht-kb-pager a {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px 22px;
    border: 1px solid var(--ht-border);
    border-radius: 14px;
    background: #fff;
    color: var(--ht-ink);
    font-weight: 700;
    line-height: 1.4;
    transition: all 0.2s ease;
}

.ht-kb-pager a small {
    color: var(--ht-muted);
    font-size: 13px;
    font-weight: 600;
}

.ht-kb-pager a.is-next {
    text-align: right;
}

.ht-kb-pager a:hover {
    border-color: var(--ht-teal-light);
    color: var(--ht-teal);
}

/* ---- Still need help ---- */
.ht-kb-help {
    padding: 0 0 96px;
}

.ht-kb-help__card {
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 40px 48px;
    border-radius: 24px;
    background: linear-gradient(135deg, #135360 0%, #0e404a 100%);
    color: #fff;
}

.ht-kb-help__icon {
    display: inline-flex;
    flex: 0 0 auto;
    width: 64px;
    height: 64px;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.12);
    font-size: 28px;
}

.ht-kb-help__card h2 {
    margin: 0 0 6px;
    color: #fff;
    font-size: 26px;
    font-weight: 800;
}

.ht-kb-help__card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
}

.ht-kb-help__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-left: auto;
}

@media (max-width: 1199px) {
    .ht-kb-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .ht-kb-layout {
        grid-template-columns: 1fr;
    }

    /* Content first on small screens; categories follow. */
    .ht-kb-sidebar {
        position: static;
        order: 2;
    }

    .ht-kb-list--two {
        grid-template-columns: 1fr;
    }

    .ht-kb-help__card {
        flex-direction: column;
        align-items: flex-start;
    }

    .ht-kb-help__actions {
        margin-left: 0;
    }

    .ht-kb-hero--compact .container {
        flex-direction: column;
        align-items: stretch;
    }

    .ht-kb-search--small {
        max-width: none;
    }
}

@media (max-width: 767px) {
    .ht-kb-hero {
        padding: 56px 0 48px;
    }

    .ht-kb-hero h1 {
        font-size: 34px;
    }

    .ht-kb-hero--compact h1 {
        font-size: 28px;
    }

    .ht-kb-grid {
        grid-template-columns: 1fr;
    }

    .ht-kb-search button {
        padding: 0 16px;
    }

    .ht-kb-article {
        padding: 26px 20px 22px;
    }

    .ht-kb-article h1 {
        font-size: 26px;
    }

    .ht-kb-pager {
        grid-template-columns: 1fr;
    }

    .ht-kb-help__card {
        padding: 32px 24px;
    }

    .ht-kb-help__actions,
    .ht-kb-help__actions .ht-btn {
        width: 100%;
        justify-content: center;
    }
}
