/* ==========================================================================
   HAVEAK Yardım Merkezi (Help Desk)
   Yardım sayfaları, arama kutusu ve makale kartları için stiller.
   Renkler mevcut tema değişkenlerine bağlıdır; karanlık temada da okunur.
   ========================================================================== */

.help-page {
    padding: 0 0 40px;
}

/* ---------- HERO ---------- */

.help-hero {
    background: linear-gradient(135deg, rgba(var(--primary), 1) 0%, rgba(var(--primary), .72) 55%, #1f2a5a 100%);
    border-radius: 1rem;
    padding: 40px 24px 44px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}

.help-hero::after {
    content: "";
    position: absolute;
    right: -60px;
    top: -60px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
}

.help-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 860px;
    margin: 0 auto;
}

.help-hero-title {
    color: #fff;
    font-weight: 700;
    font-size: 1.75rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.help-hero-sub {
    color: rgba(255, 255, 255, .85);
    font-size: .95rem;
    margin-bottom: 22px;
}

.help-hero-search {
    max-width: 700px;
}

/* ---------- ARAMA KUTUSU ---------- */

.help-search {
    position: relative;
    width: 100%;
}

.help-search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.help-search-icon {
    position: absolute;
    left: 14px;
    font-size: 20px;
    color: var(--bs-secondary-color);
    pointer-events: none;
    z-index: 2;
}

.help-search-input {
    height: 46px;
    padding-left: 44px;
    padding-right: 78px;
    border-radius: 23px;
    border: 1px solid var(--bs-border-color);
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}

.help-search-input::placeholder {
    color: var(--bs-secondary-color);
    opacity: 1;
}

.help-hero .help-search-input {
    height: 54px;
    font-size: 1rem;
}

.help-search-input:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 4px 18px rgba(0, 0, 0, .14);
}

.help-search-clear {
    position: absolute;
    right: 44px;
    background: transparent;
    border: 0;
    color: var(--bs-secondary-color);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 4px;
    z-index: 2;
}

.help-search-kbd {
    position: absolute;
    right: 12px;
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .3px;
    color: var(--bs-secondary-color);
    border: 1px solid var(--bs-border-color);
    border-bottom-width: 2px;
    border-radius: 5px;
    padding: 2px 6px;
    background: var(--bs-body-bg);
    pointer-events: none;
}

.help-search-compact .help-search-input {
    height: 38px;
    font-size: .82rem;
    padding-right: 34px;
    border-radius: 19px;
}

.help-search-compact .help-search-icon {
    font-size: 16px;
    left: 11px;
}

.help-search-compact .help-search-kbd {
    display: none;
}

.help-search-compact .help-search-clear {
    right: 8px;
    font-size: 15px;
}

/* ---------- AÇILIR SONUÇ PANELİ ---------- */

.help-search-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: .75rem;
    overflow: hidden;
    z-index: 1050;
    max-height: 420px;
    overflow-y: auto;
}

.help-search-item {
    display: flex;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--bs-border-color);
    cursor: pointer;
    align-items: flex-start;
}

.help-search-item.active,
.help-search-item:hover {
    background: var(--bs-primary-bg-subtle);
}

.help-search-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--bs-primary-bg-subtle);
    color: var(--bs-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
}

.help-search-item-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.help-search-item-title {
    font-weight: 600;
    font-size: .87rem;
    color: var(--bs-body-color);
}

.help-search-item-summary {
    font-size: .76rem;
    color: var(--bs-secondary-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.help-search-item-meta {
    font-size: .68rem;
    color: var(--bs-secondary-color);
    opacity: .8;
}

.help-search-all {
    width: 100%;
    padding: 10px;
    background: var(--bs-tertiary-bg);
    border: 0;
    border-top: 1px solid var(--bs-border-color);
    color: var(--bs-primary);
    font-weight: 600;
    font-size: .82rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.help-search-all:hover {
    background: var(--bs-primary-bg-subtle);
}

/* ---------- ÖNERİ ÇUBUĞU ---------- */

.help-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 18px;
}

.help-suggestions-label {
    color: rgba(255, 255, 255, .8);
    font-size: .75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.help-suggestion-chip {
    background: rgba(255, 255, 255, .16);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 20px;
    padding: 5px 13px;
    font-size: .78rem;
    text-decoration: none;
    transition: all .2s ease;
    backdrop-filter: blur(4px);
}

.help-suggestion-chip:hover {
    background: rgba(255, 255, 255, .3);
    color: #fff;
}

.help-empty .help-suggestion-chip {
    background: var(--bs-tertiary-bg);
    color: var(--bs-body-color);
    border-color: var(--bs-border-color);
}

.help-empty .help-suggestion-chip:hover {
    background: var(--bs-primary-bg-subtle);
    color: var(--bs-primary);
}

.help-empty .help-suggestions-label {
    color: var(--bs-secondary-color);
}

/* ---------- ÜST MENÜ ÇUBUĞU ENTEGRASYONU ---------- */

.header-help {
    display: flex;
    align-items: center;
    gap: 6px;
}

.help-global-search {
    width: 210px;
}

@media (max-width: 1199px) {
    .help-global-search {
        display: none;
    }
}

@media (max-width: 575px) {
    .header-help {
        display: none;
    }
}

/* ---------- BLOK BAŞLIKLARI ---------- */

.help-block-title {
    font-weight: 700;
    font-size: .95rem;
    margin: 26px 0 12px;
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--bs-body-color);
}

/* ---------- KATEGORİ KARTLARI ---------- */

.help-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}

.help-category {
    display: flex;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--bs-border-color);
    border-radius: .85rem;
    background: var(--bs-body-bg);
    text-decoration: none;
    color: inherit;
    transition: all .2s ease;
    height: 100%;
}

.help-category:hover {
    border-color: var(--bs-primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
    color: inherit;
}

.help-category-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--bs-primary-bg-subtle);
    color: var(--bs-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.help-category-body h6 {
    font-weight: 700;
    font-size: .9rem;
    margin-bottom: 3px;
    color: var(--bs-body-color);
}

.help-category-body p {
    font-size: .75rem;
    color: var(--bs-secondary-color);
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.help-category-count {
    font-size: .7rem;
    color: var(--bs-primary);
    font-weight: 600;
}

/* ---------- KONU GRUPLARI (AKORDEON) ---------- */

.help-group {
    border: 1px solid var(--bs-border-color);
    border-radius: .75rem;
    margin-bottom: 10px;
    overflow: hidden;
    background: var(--bs-body-bg);
}

.help-group-header {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 16px;
    background: var(--bs-tertiary-bg);
    border: 0;
    font-weight: 600;
    font-size: .88rem;
    cursor: pointer;
    color: var(--bs-body-color);
    text-align: left;
}

.help-group-header:hover {
    background: var(--bs-primary-bg-subtle);
}

.help-group-count {
    background: var(--bs-secondary-bg);
    color: var(--bs-secondary-color);
    border-radius: 10px;
    padding: 1px 9px;
    font-size: .72rem;
    font-weight: 600;
}

.help-group-body {
    padding: 14px;
}

.rotate-180 {
    transform: rotate(180deg);
    transition: transform .2s ease;
}

/* ---------- MAKALE KARTI ---------- */

.help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 12px;
}

.help-card {
    display: flex;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--bs-border-color);
    border-radius: .75rem;
    background: var(--bs-body-bg);
    text-decoration: none;
    color: inherit;
    height: 100%;
    transition: all .18s ease;
    position: relative;
}

.help-card:hover {
    border-color: var(--bs-primary);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .07);
    color: inherit;
    transform: translateY(-1px);
}

.help-card-icon {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    background: var(--bs-primary-bg-subtle);
    color: var(--bs-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.help-card-body {
    flex: 1;
    min-width: 0;
}

.help-card-title {
    font-weight: 700;
    font-size: .88rem;
    margin-bottom: 4px;
    color: var(--bs-body-color);
}

.help-card-summary {
    font-size: .78rem;
    color: var(--bs-secondary-color);
    margin-bottom: 7px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.help-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: .68rem;
    color: var(--bs-secondary-color);
    opacity: .85;
}

.help-card-score {
    color: var(--bs-primary);
    font-weight: 700;
}

.help-card-semantic {
    color: var(--bs-purple, #6f42c1);
    font-weight: 700;
}

.help-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
}

.help-card-arrow {
    align-self: center;
    color: var(--bs-secondary-color);
    opacity: 0;
    transition: opacity .18s ease, transform .18s ease;
}

.help-card:hover .help-card-arrow {
    opacity: 1;
    transform: translateX(3px);
}

.help-card mark {
    background: rgba(255, 214, 0, .45);
    color: inherit;
    padding: 0 1px;
    border-radius: 2px;
}

/* ---------- SONUÇ SAYFASI ---------- */

.help-search-page-head {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 22px;
}

.help-search-page-head .help-search {
    max-width: 720px;
}

.help-results-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    font-size: .84rem;
    color: var(--bs-secondary-color);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--bs-border-color);
}

.help-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bs-primary-bg-subtle);
    color: var(--bs-primary);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: .8rem;
    margin-bottom: 16px;
}

.help-filter-chip a {
    color: var(--bs-primary);
    margin-left: 4px;
}

.help-score-detail {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 6px 12px 0 62px;
    font-size: .68rem;
    color: var(--bs-secondary-color);
}

.help-empty {
    text-align: center;
    padding: 50px 20px;
    border: 1px dashed var(--bs-border-color);
    border-radius: 1rem;
}

.help-empty h5 {
    margin: 12px 0 6px;
    font-weight: 700;
}

.help-empty p {
    max-width: 560px;
    margin: 0 auto;
    font-size: .85rem;
}

.help-empty .help-suggestions {
    margin-top: 18px;
}

.help-empty .help-suggestions-label {
    display: none;
}

/* ---------- MAKALE DETAY ---------- */

.help-article-head {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--bs-border-color);
}

.help-article-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--bs-primary-bg-subtle);
    color: var(--bs-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 25px;
    flex-shrink: 0;
}

.help-article-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--bs-body-color);
}

.help-article-summary {
    font-size: .88rem;
    color: var(--bs-secondary-color);
    margin-bottom: 10px;
}

.help-article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.help-article-body {
    line-height: 1.75;
}

.help-section {
    margin-bottom: 26px;
    scroll-margin-top: 80px;
}

.help-section-heading {
    font-size: .95rem;
    font-weight: 700;
    margin-bottom: 9px;
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--bs-body-color);
}

.help-text {
    font-size: .87rem;
    color: var(--bs-secondary-color);
    margin-bottom: 0;
}

.help-bullets {
    font-size: .87rem;
    color: var(--bs-secondary-color);
    padding-left: 18px;
    margin-bottom: 0;
}

.help-bullets li {
    margin-bottom: 5px;
}

/* Adım listesi */

.help-steps {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: help-step;
}

.help-step {
    display: flex;
    gap: 11px;
    margin-bottom: 11px;
    align-items: flex-start;
}

.help-step-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bs-primary);
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

.help-step-text {
    font-size: .87rem;
    color: var(--bs-secondary-color);
}

/* Alan açıklamaları */

.help-fields {
    display: grid;
    grid-template-columns: minmax(120px, 200px) 1fr;
    gap: 0;
    margin: 0;
    border: 1px solid var(--bs-border-color);
    border-radius: .6rem;
    overflow: hidden;
    font-size: .83rem;
}

.help-fields dt {
    background: var(--bs-tertiary-bg);
    padding: 9px 12px;
    font-weight: 600;
    color: var(--bs-body-color);
    border-bottom: 1px solid var(--bs-border-color);
}

.help-fields dd {
    margin: 0;
    padding: 9px 12px;
    color: var(--bs-secondary-color);
    border-bottom: 1px solid var(--bs-border-color);
}

/* Uyarı / ipucu / not kutuları */

.help-callout {
    display: flex;
    gap: 11px;
    padding: 13px 15px;
    border-radius: .7rem;
    font-size: .85rem;
    border-left: 4px solid;
    align-items: flex-start;
}

.help-callout > i {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 1px;
}

.help-callout p {
    margin-bottom: 0;
}

.help-callout ul {
    margin: 6px 0 0;
    padding-left: 18px;
}

.help-callout li {
    margin-bottom: 3px;
}

.help-callout-note {
    background: var(--bs-info-bg-subtle);
    border-color: var(--bs-info);
    color: var(--bs-info-text-emphasis, var(--bs-body-color));
}

.help-callout-tip {
    background: var(--bs-success-bg-subtle);
    border-color: var(--bs-success);
    color: var(--bs-success-text-emphasis, var(--bs-body-color));
}

.help-callout-warning {
    background: var(--bs-warning-bg-subtle);
    border-color: var(--bs-warning);
    color: var(--bs-warning-text-emphasis, var(--bs-body-color));
}

/* Yetki listesi */

.help-permissions {
    list-style: none;
    padding: 0;
    margin: 0;
}

.help-permissions li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .85rem;
    color: var(--bs-secondary-color);
    margin-bottom: 6px;
}

.help-permissions i {
    color: var(--bs-success);
    font-size: 17px;
}

/* ---------- YAN PANEL ---------- */

.help-aside {
    position: sticky;
    top: 80px;
}

.help-aside-title {
    font-size: .84rem;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--bs-body-color);
}

.help-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.help-toc-list li {
    margin-bottom: 2px;
}

.help-toc-list a {
    display: block;
    padding: 5px 9px;
    border-radius: 6px;
    font-size: .8rem;
    color: var(--bs-secondary-color);
    text-decoration: none;
    border-left: 2px solid transparent;
}

.help-toc-list a:hover {
    background: var(--bs-tertiary-bg);
    color: var(--bs-primary);
}

.help-toc-list a.active {
    background: var(--bs-primary-bg-subtle);
    color: var(--bs-primary);
    border-left-color: var(--bs-primary);
    font-weight: 600;
}

/* ---------- ÖNCEKİ / SONRAKİ ---------- */

.help-pager {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.help-pager-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 15px;
    border: 1px solid var(--bs-border-color);
    border-radius: .7rem;
    text-decoration: none;
    color: inherit;
    max-width: 48%;
    flex: 1 1 200px;
    transition: all .18s ease;
}

.help-pager-link:hover {
    border-color: var(--bs-primary);
    color: inherit;
}

.help-pager-link i {
    font-size: 18px;
    color: var(--bs-primary);
}

.help-pager-link span {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.help-pager-link small {
    font-size: .68rem;
    color: var(--bs-secondary-color);
}

.help-pager-link strong {
    font-size: .82rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.help-related {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--bs-border-color);
}

/* ---------- DUYARLI ---------- */

@media (max-width: 991px) {
    .help-aside {
        position: static;
    }

    .help-hero-title {
        font-size: 1.4rem;
    }

    .help-fields {
        grid-template-columns: 1fr;
    }

    .help-fields dt {
        border-bottom: 0;
    }
}

@media (max-width: 575px) {
    .help-grid {
        grid-template-columns: 1fr;
    }

    .help-hero {
        padding: 26px 16px 30px;
    }

    .help-score-detail {
        padding-left: 12px;
    }
}