/* ==========================================================================
   Sıkça Sorulan Sorular (Faq/Index)
   Önek: .akf-  ·  JS kancaları (sayfadaki script): .faq-item, .faq-question[data-faq-id],
   .faq-question-text, .faq-answer-inner, .is-open, #faqSearch
   ========================================================================== */

.akf-page { overflow-x: clip; }

.akf-section {
    position: relative;
    padding-block: clamp(40px, 5vw, 80px) var(--ak-section-y);
    background: var(--ak-bg);
}
.akf-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: clamp(32px, 4vw, 64px);
    align-items: start;
}
.akf-aside {
    position: sticky;
    top: calc(var(--navbar-height) + var(--top-banner-height, 0px) + 24px);
    display: grid;
    gap: 20px;
}

/* ------------------------------ Arama ------------------------------ */
.akf-toolbar { display: grid; gap: 20px; }
.akf-search { position: relative; }
.akf-search input {
    width: 100%;
    min-height: 56px;
    padding: 12px 18px;
    padding-inline-start: 50px;
    border: 1.5px solid var(--ak-line-strong);
    border-radius: 18px;
    background: #fff;
    color: var(--ak-ink);
    font-family: var(--ak-font);
    font-size: 1rem;
    box-shadow: var(--ak-shadow-xs);
    -webkit-appearance: none;
    appearance: none;
}
.akf-search input::placeholder { color: var(--ak-subtle); }
.akf-search input:hover { border-color: var(--ak-plum-200); }
.akf-search input:focus { outline: none; border-color: var(--ak-plum-400); box-shadow: var(--ak-ring); }
.akf-search .faq-search-icon {
    position: absolute;
    top: 50%;
    inset-inline-start: 19px;
    transform: translateY(-50%);
    color: var(--ak-plum-400);
    font-size: .9375rem;
    pointer-events: none;
}

/* ------------------------------ Kategoriler ------------------------------ */
.akf-cats { display: grid; gap: 10px; }
.akf-cats__label {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding-inline: 4px;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ak-muted);
}
.akf-cats__label .ak-kufi { font-size: .9375rem; letter-spacing: 0; text-transform: none; color: var(--ak-sand); }
.akf-cats__list {
    display: grid;
    gap: 4px;
    padding: 6px;
    border-radius: 20px;
    border: 1px solid var(--ak-line);
    background: #fff;
}
.akf-cats .faq-category-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 46px;
    padding: 10px 14px;
    border-radius: 14px;
    color: var(--ak-ink-2);
    font-size: .9375rem;
    font-weight: 600;
    text-decoration: none;
}
.akf-cats .faq-category-chip:hover { background: var(--ak-plum-50); color: var(--ak-plum-700); }
.akf-cats .faq-category-chip.active { background: var(--ak-plum-900); color: #fff; }
.akf-cats .faq-category-count {
    min-width: 28px;
    height: 24px;
    padding-inline: 8px;
    display: inline-grid;
    place-items: center;
    border-radius: var(--ak-radius-pill);
    background: var(--ak-surface-2);
    color: var(--ak-muted);
    font-size: .75rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.akf-cats .faq-category-chip.active .faq-category-count { background: var(--ak-sun); color: var(--ak-plum-950); }

/* ------------------------------ Yardım kartı ------------------------------ */
.akf-help {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: grid;
    justify-items: start;
    gap: 10px;
    padding: 24px;
    border-radius: 24px;
    background: var(--ak-plum-950);
    color: #fff;
}
.akf-help::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: var(--ak-mashrabiya);
    background-size: 44px 44px;
    opacity: .7;
    -webkit-mask-image: radial-gradient(ellipse 90% 70% at 100% 0%, #000, transparent 70%);
    mask-image: radial-gradient(ellipse 90% 70% at 100% 0%, #000, transparent 70%);
}
.akf-help__arch {
    position: absolute;
    top: 18px;
    inset-inline-end: 18px;
    width: 64px;
    height: 78px;
    display: grid;
    place-items: center;
    padding-top: 6px;
    border-radius: 50% 50% 12px 12px / 40% 40% 12px 12px;
    border: 1px solid rgba(238, 215, 21, .35);
    background: rgba(255, 255, 255, .05);
}
.akf-help__arch .ak-kufi { color: var(--ak-sun); font-size: 1.125rem; direction: inherit; }
.akf-help__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border-radius: var(--ak-radius-pill);
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .12);
    color: rgba(255, 255, 255, .9);
    font-size: .75rem;
    font-weight: 700;
}
.akf-help__badge i { color: var(--ak-sun); }
.akf-help__title { margin: 6px 0 0; color: #fff; font-size: 1.375rem; font-weight: 700; letter-spacing: -.02em; padding-inline-end: 72px; }
.akf-help__text { margin: 0 0 8px; color: rgba(255, 255, 255, .7) !important; font-size: .9375rem; line-height: 1.6; }
.akf-help .ak-btn { white-space: normal; text-align: center; }
.akf-help__phone { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 4px; font-size: .8125rem; color: rgba(255, 255, 255, .55); }
.akf-help__phone a { color: #fff; font-weight: 700; font-size: 1rem; text-decoration: none; direction: ltr; display: inline-flex; min-height: 44px; align-items: center; }
.akf-help__phone a:hover { color: var(--ak-sun); }

/* ------------------------------ Soru listesi ------------------------------ */
.akf-list { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.akf-item {
    border-radius: 20px;
    border: 1px solid var(--ak-line);
    background: #fff;
    overflow: hidden;
}
.akf-item:hover { border-color: var(--ak-plum-200); }
.akf-item.is-open { border-color: var(--ak-plum-200); box-shadow: var(--ak-shadow); }

.akf-q {
    width: 100%;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    min-height: 72px;
    padding: 16px 20px;
    border: 0;
    background: transparent;
    color: var(--ak-ink);
    text-align: start;
    cursor: pointer;
}
.akf-q:focus-visible { outline: 2px solid var(--ak-plum-500); outline-offset: -2px; border-radius: 20px; }
.akf-q__num {
    width: 40px;
    height: 48px;
    display: grid;
    place-items: center;
    padding-top: 4px;
    border-radius: 50% 50% 10px 10px / 40% 40% 10px 10px;
    background: var(--ak-plum-50);
    color: var(--ak-plum-600);
    font-family: var(--ak-font-naskh);
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1;
}
.akf-item.is-open .akf-q__num { background: var(--ak-plum-900); color: var(--ak-sun); }
.akf-q .faq-question-body { display: grid; gap: 4px; min-width: 0; }
.akf-q .faq-badge {
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ak-plum-500);
}
.akf-q .faq-question-text { font-size: 1.0625rem; font-weight: 700; line-height: 1.4; letter-spacing: -.01em; overflow-wrap: anywhere; }
.akf-q .faq-question-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--ak-surface-2);
    color: var(--ak-ink-2);
    font-size: .75rem;
}
.akf-item.is-open .faq-question-icon { transform: rotate(180deg); background: var(--ak-plum-600); color: #fff; }

/* Yanıt: grid satırı 0fr → 1fr (yükseklik bilinmeden açılır) */
.akf-item .faq-answer { display: grid; grid-template-rows: 0fr; visibility: hidden; }
.akf-item.is-open .faq-answer { grid-template-rows: 1fr; visibility: visible; }
.akf-item .faq-answer-inner { min-height: 0; overflow: hidden; }
.akf-a__body {
    margin: 0 20px 22px;
    margin-inline-start: 76px;
    padding-top: 16px;
    border-top: 1px dashed var(--ak-line-strong);
    max-width: 68ch;
    color: var(--ak-ink-2);
    font-size: 1rem;
    line-height: 1.75;
}
.akf-a__body p:last-child { margin-bottom: 0; }
.akf-a__body a { font-weight: 600; }

/* Boş durum */
.akf-empty {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 48px 24px;
    border-radius: 24px;
    border: 1px dashed var(--ak-line-strong);
    background: #fff;
    text-align: center;
}
.akf-empty__arch {
    width: 72px;
    height: 88px;
    margin-bottom: 8px;
    display: grid;
    place-items: center;
    border-radius: 50% 50% 14px 14px / 40% 40% 14px 14px;
    background: var(--ak-plum-50);
    color: var(--ak-plum-600);
    font-size: 1.5rem;
}
.akf-empty h3 { margin: 0; font-size: 1.25rem; }
.akf-empty p { margin: 0; color: var(--ak-muted); }

@media (prefers-reduced-motion: no-preference) {
    .akf-item, .akf-cats .faq-category-chip, .akf-search input {
        transition: border-color .2s var(--ak-ease), box-shadow .25s var(--ak-ease), background-color .2s var(--ak-ease), color .2s !important;
    }
    .akf-item .faq-answer { transition: grid-template-rows .35s var(--ak-ease), visibility .35s !important; }
    .akf-q .faq-question-icon, .akf-q__num { transition: transform .3s var(--ak-ease), background-color .2s, color .2s !important; }
}

/* ------------------------------ Duyarlı ------------------------------ */
@media (max-width: 991.98px) {
    .akf-layout { display: flex; flex-direction: column; gap: 20px; }
    .akf-aside { display: contents; }
    .akf-toolbar { order: 1; gap: 14px; }
    .akf-list { order: 2; width: 100%; }
    .akf-help { order: 3; width: 100%; }

    .akf-cats__label { display: none; }
    .akf-cats__list {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        scrollbar-width: none;
        margin-inline: calc(var(--ak-gutter) * -1);
        padding: 2px var(--ak-gutter);
        border: 0;
        border-radius: 0;
        background: transparent;
    }
    .akf-cats__list::-webkit-scrollbar { display: none; }
    .akf-cats .faq-category-chip {
        flex: none;
        min-height: 44px;
        padding: 8px 8px 8px 16px;
        border-radius: var(--ak-radius-pill);
        border: 1px solid var(--ak-line);
        background: #fff;
        white-space: nowrap;
    }
    html[dir="rtl"] .akf-cats .faq-category-chip { padding: 8px 16px 8px 8px; }
    .akf-cats .faq-category-chip.active { border-color: var(--ak-plum-900); }
}

@media (max-width: 767.98px) {
    .akf-section { padding-top: 28px; }
    .akf-item { border-radius: 18px; }
    .akf-q { gap: 12px; min-height: 64px; padding: 14px; }
    .akf-q__num { width: 34px; height: 42px; font-size: 1rem; }
    .akf-q .faq-question-text { font-size: 1rem; }
    .akf-q .faq-question-icon { width: 32px; height: 32px; }
    .akf-a__body { margin: 0 14px 18px; padding-top: 14px; font-size: .9875rem; }
    .akf-help { padding: 22px 20px; }
}
