/* ═══════════════════════════════════════════════════════════════════════
   BOLMOL — FAQ stylesheet (light)
   Loaded by: faq/index.php, faq/section.php, faq/item.php
   ═══════════════════════════════════════════════════════════════════════ */

.bm-faq-wrap {
    max-width: 1120px;
    padding-top: 24px;
    padding-bottom: 48px;
}

/* ── Header ──────────────────────────────────────────────── */
.bm-faq-header {
    text-align: center;
    padding: 32px 0 40px;
    border-bottom: 1px solid var(--bm-border-soft);
    margin-bottom: 32px;
}

.bm-faq-title {
    font-size: clamp(1.6rem, 3.5vw, 2.25rem);
    font-weight: 800;
    color: var(--bm-text);
    margin: 0 0 8px;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.bm-faq-sub {
    font-size: 0.975rem;
    color: var(--bm-text-soft);
    max-width: 560px;
    margin: 0 auto 24px;
    line-height: 1.55;
}

/* ── Search ──────────────────────────────────────────────── */
.bm-faq-search {
    display: flex;
    align-items: stretch;
    gap: 10px;
    max-width: 620px;
    margin: 0 auto;
}

.bm-faq-search-input {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    background: var(--bm-surface);
    border: 1px solid var(--bm-border);
    border-radius: var(--bm-radius);
    transition: border-color 90ms ease, box-shadow 90ms ease;
}

.bm-faq-search-input:focus-within {
    border-color: var(--bm-primary);
    box-shadow: 0 0 0 3px var(--bm-primary-soft);
}

.bm-faq-search-input > i.bi-search,
.bm-faq-search-input > i.fa-magnifying-glass {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--bm-text-faint);
    font-size: 1rem;
    pointer-events: none;
}

.bm-faq-search-input .form-control {
    border: 0;
    background: transparent;
    padding-left: 40px;
    padding-right: 40px;
    box-shadow: none;
    font-size: 0.95rem;
    color: var(--bm-text);
    height: 46px;
}

.bm-faq-search-input .form-control:focus {
    border: 0;
    box-shadow: none;
    background: transparent;
}

.bm-faq-search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: var(--bm-text-soft);
    background: transparent;
    text-decoration: none;
    font-size: 0.85rem;
}

.bm-faq-search-clear:hover,
.bm-faq-search-clear:focus {
    background: var(--bm-surface-hover);
    color: var(--bm-text);
    text-decoration: none;
}

.bm-faq-search .btn {
    min-width: 110px;
    padding-left: 22px;
    padding-right: 22px;
    font-weight: 600;
    height: 46px;
}

/* ── Search results ──────────────────────────────────────── */
.bm-faq-results { margin-bottom: 40px; }

.bm-faq-results-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--bm-text-soft);
    margin: 0 0 16px;
}

.bm-faq-results-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0;
    margin: 0;
}

.bm-faq-result {
    display: block;
    padding: 18px 20px;
    background: var(--bm-surface);
    border: 1px solid var(--bm-border-soft);
    border-radius: var(--bm-radius);
    color: inherit;
    text-decoration: none;
    transition: border-color 90ms ease, box-shadow 90ms ease;
}

.bm-faq-result:hover,
.bm-faq-result:focus {
    border-color: var(--bm-border);
    box-shadow: var(--bm-shadow);
    color: inherit;
    text-decoration: none;
}

.bm-faq-result-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.bm-faq-result-header i {
    color: var(--bm-primary);
    font-size: 0.95rem;
}

.bm-faq-result-section {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--bm-text-faint);
    font-weight: 700;
}

.bm-faq-result-q {
    font-size: 1rem;
    font-weight: 600;
    color: var(--bm-text);
    margin: 0 0 4px;
    line-height: 1.35;
    word-break: break-word;
}

.bm-faq-result:hover .bm-faq-result-q { color: var(--bm-primary); }

.bm-faq-result-excerpt {
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--bm-text-soft);
    margin: 0;
    word-break: break-word;
}

/* ── Section grid ────────────────────────────────────────── */
.bm-faq-sections-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.bm-faq-card {
    display: flex;
    flex-direction: column;
    background: var(--bm-surface);
    border: 1px solid var(--bm-border-soft);
    border-radius: var(--bm-radius-lg);
    padding: 22px;
    height: 100%;
    transition: border-color 90ms ease, box-shadow 90ms ease;
}

.bm-faq-card:hover {
    border-color: var(--bm-border);
    box-shadow: var(--bm-shadow);
}

.bm-faq-card-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 14px;
}

.bm-faq-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bm-primary-soft);
    color: var(--bm-primary);
    font-size: 1.25rem;
    flex-shrink: 0;
    line-height: 1;
}

.bm-faq-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--bm-text);
    margin: 0 0 2px;
    line-height: 1.3;
}

.bm-faq-card-title a { color: inherit; text-decoration: none; }
.bm-faq-card-title a:hover { color: var(--bm-primary); }

.bm-faq-card-desc {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--bm-text-soft);
    margin: 4px 0 0;
}

.bm-faq-card-items {
    list-style: none;
    padding: 0;
    margin: 0 0 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bm-faq-card-items li a {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 7px 10px;
    border-radius: var(--bm-radius-sm);
    font-size: 0.875rem;
    line-height: 1.4;
    color: var(--bm-text-soft);
    text-decoration: none;
    transition: background 90ms ease, color 90ms ease;
    word-break: break-word;
}

.bm-faq-card-items li a:hover,
.bm-faq-card-items li a:focus {
    background: var(--bm-surface-hover);
    color: var(--bm-text);
    text-decoration: none;
}

.bm-faq-card-items li a i {
    font-size: 0.72rem;
    color: var(--bm-text-faint);
    margin-top: 4px;
    flex-shrink: 0;
}

.bm-faq-card-footer {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--bm-border-faint);
}

.bm-faq-card-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--bm-primary);
    text-decoration: none;
    transition: color 90ms ease, gap 90ms ease;
}

.bm-faq-card-more:hover {
    color: var(--bm-primary-hover);
    gap: 9px;
    text-decoration: none;
}

.bm-faq-card-empty { padding: 8px 0 4px; }

/* ── Section page header ─────────────────────────────────── */
.bm-faq-section-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.bm-faq-section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--bm-primary-soft);
    color: var(--bm-primary);
    font-size: 1.5rem;
    flex-shrink: 0;
    line-height: 1;
}

.bm-faq-section-title {
    font-size: clamp(1.35rem, 2.5vw, 1.65rem);
    font-weight: 800;
    color: var(--bm-text);
    margin: 0;
    line-height: 1.25;
    letter-spacing: -0.015em;
}

.bm-faq-section-desc {
    font-size: 0.925rem;
    line-height: 1.55;
    color: var(--bm-text-soft);
    margin: 6px 0 0;
}

/* ── Section items list ──────────────────────────────────── */
.bm-faq-section-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0;
    margin: 0;
}

.bm-faq-section-link {
    display: block;
    padding: 18px 20px;
    background: var(--bm-surface);
    border: 1px solid var(--bm-border-soft);
    border-radius: var(--bm-radius);
    color: inherit;
    text-decoration: none;
    transition: border-color 90ms ease, box-shadow 90ms ease;
}

.bm-faq-section-link:hover,
.bm-faq-section-link:focus {
    border-color: var(--bm-border);
    box-shadow: var(--bm-shadow);
    color: inherit;
    text-decoration: none;
}

.bm-faq-section-link-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.bm-faq-section-q {
    font-size: 1rem;
    font-weight: 600;
    color: var(--bm-text);
    margin: 0;
    line-height: 1.35;
    flex: 1;
    word-break: break-word;
}

.bm-faq-section-link:hover .bm-faq-section-q { color: var(--bm-primary); }

.bm-faq-section-chevron {
    font-size: 0.85rem;
    color: var(--bm-text-faint);
    flex-shrink: 0;
    margin-top: 4px;
    transition: transform 90ms ease, color 90ms ease;
}

.bm-faq-section-link:hover .bm-faq-section-chevron {
    color: var(--bm-primary);
    transform: translateX(2px);
}

.bm-faq-section-preview {
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--bm-text-soft);
    margin: 0;
    word-break: break-word;
}

/* ── Item page ───────────────────────────────────────────── */
.bm-faq-item {
    background: var(--bm-surface);
    border: 1px solid var(--bm-border-soft);
    border-radius: var(--bm-radius-lg);
    padding: 32px 28px;
    margin-bottom: 24px;
    box-shadow: var(--bm-shadow-sm);
}

.bm-faq-item-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--bm-border-soft);
    margin-bottom: 22px;
}

.bm-faq-item-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bm-primary-soft);
    color: var(--bm-primary);
    font-size: 1.3rem;
    flex-shrink: 0;
    line-height: 1;
}

.bm-faq-item-question {
    font-size: clamp(1.2rem, 2.4vw, 1.5rem);
    font-weight: 800;
    color: var(--bm-text);
    margin: 0;
    line-height: 1.3;
    letter-spacing: -0.015em;
    word-break: break-word;
}

.bm-faq-item-answer {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--bm-text-soft);
    word-break: break-word;
}

.bm-faq-item-answer h2,
.bm-faq-item-answer h3,
.bm-faq-item-answer h4 {
    color: var(--bm-text);
    margin: 24px 0 8px;
    line-height: 1.3;
}

.bm-faq-item-answer h2 { font-size: 1.2rem; font-weight: 700; }
.bm-faq-item-answer h3 { font-size: 1.05rem; font-weight: 700; }
.bm-faq-item-answer h4 { font-size: 0.95rem; font-weight: 700; }

.bm-faq-item-answer p { margin: 0 0 16px; }
.bm-faq-item-answer p:last-child { margin-bottom: 0; }

.bm-faq-item-answer ul,
.bm-faq-item-answer ol {
    margin: 0 0 16px;
    padding-left: 24px;
    padding-inline-start: 24px;
    padding-right: 0;
    padding-inline-end: 0;
}

.bm-faq-item-answer li { margin-bottom: 6px; }

.bm-faq-item-answer a {
    color: var(--bm-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.bm-faq-item-answer a:hover { color: var(--bm-primary-hover); }

.bm-faq-item-answer code {
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--bm-surface-2);
    color: var(--bm-text);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.88em;
}

.bm-faq-item-answer pre {
    background: var(--bm-surface-2);
    border: 1px solid var(--bm-border-soft);
    border-radius: var(--bm-radius);
    padding: 14px 16px;
    margin: 0 0 16px;
    overflow-x: auto;
    font-size: 0.875rem;
    line-height: 1.55;
}

.bm-faq-item-answer pre code {
    background: transparent;
    padding: 0;
    font-size: inherit;
}

.bm-faq-item-answer blockquote {
    border-left: 3px solid var(--bm-border);
    padding: 6px 0 6px 16px;
    margin: 0 0 16px;
    color: var(--bm-text-soft);
    font-style: italic;
}

.bm-faq-item-footer {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--bm-border-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.bm-faq-item-meta {
    font-size: 0.8rem;
    color: var(--bm-text-faint);
}

.bm-faq-item-updated time { font-variant-numeric: tabular-nums; }

.bm-faq-item-related { margin-bottom: 24px; }

.bm-faq-item-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--bm-primary);
    text-decoration: none;
    transition: color 90ms ease, gap 90ms ease;
}

.bm-faq-item-back:hover {
    color: var(--bm-primary-hover);
    gap: 10px;
    text-decoration: none;
}

/* ── Vote buttons ────────────────────────────────────────── */
.bm-faq-vote-block {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.bm-faq-vote-question {
    font-size: 0.9rem;
    color: var(--bm-text-soft);
    margin: 0;
    font-weight: 600;
    white-space: nowrap;
}

.bm-faq-vote-btns {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bm-faq-vote {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    min-height: 40px;
    background: var(--bm-surface);
    color: var(--bm-text-soft);
    border: 1px solid var(--bm-border);
    border-radius: var(--bm-radius);
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 90ms ease, border-color 90ms ease, color 90ms ease;
    user-select: none;
}

.bm-faq-vote:hover:not(:disabled):not(.is-active) {
    background: var(--bm-surface-hover);
    border-color: var(--bm-border-strong, var(--bm-border));
    color: var(--bm-text);
}

.bm-faq-vote:focus-visible {
    outline: 2px solid var(--bm-primary);
    outline-offset: 2px;
}

.bm-faq-vote:disabled { opacity: 0.55; cursor: not-allowed; }

.bm-faq-vote i { font-size: 1rem; line-height: 1; }

.bm-faq-vote-count {
    display: inline-block;
    padding: 2px 8px;
    background: var(--bm-surface-2);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.4;
    min-width: 26px;
    text-align: center;
}

.bm-faq-vote-like.is-active {
    background: var(--bm-success-soft);
    border-color: var(--bm-success);
    color: var(--bm-success);
}

.bm-faq-vote-like.is-active .bm-faq-vote-count {
    background: rgba(66, 183, 42, 0.18);
    color: var(--bm-success);
}

.bm-faq-vote-dislike.is-active {
    background: var(--bm-danger-soft);
    border-color: var(--bm-danger);
    color: var(--bm-danger);
}

.bm-faq-vote-dislike.is-active .bm-faq-vote-count {
    background: rgba(250, 56, 62, 0.18);
    color: var(--bm-danger);
}

/* ── Sidebar ─────────────────────────────────────────────── */
.bm-faq-sidebar { padding: 20px; }

.bm-faq-sidebar-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--bm-text-faint);
    margin: 0 0 14px;
}

.bm-faq-sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0;
    margin: 0;
}

.bm-faq-sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: var(--bm-radius-sm);
    color: var(--bm-text-soft);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 90ms ease, color 90ms ease;
    word-break: break-word;
}

.bm-faq-sidebar-link i {
    font-size: 1rem;
    opacity: 0.85;
    flex-shrink: 0;
}

.bm-faq-sidebar-link:hover,
.bm-faq-sidebar-link:focus {
    background: var(--bm-surface-hover);
    color: var(--bm-text);
    text-decoration: none;
}

.bm-faq-sidebar-link.active {
    background: var(--bm-primary-soft);
    color: var(--bm-primary);
    font-weight: 600;
}

.bm-faq-sidebar-link.active i { opacity: 1; }

.bm-faq-sidebar-divider {
    margin: 16px 0;
    border-color: var(--bm-border-soft);
}

.bm-faq-sidebar-cta { text-align: center; }

.bm-faq-sidebar-cta-text {
    font-size: 0.8rem;
    color: var(--bm-text-soft);
    margin: 0 0 10px;
    line-height: 1.45;
}

/* ── Breadcrumb ──────────────────────────────────────────── */
.bm-faq-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--bm-text-faint);
    margin-bottom: 24px;
}

.bm-faq-breadcrumb a {
    color: var(--bm-text-soft);
    text-decoration: none;
    transition: color 90ms ease;
}

.bm-faq-breadcrumb a:hover {
    color: var(--bm-primary);
    text-decoration: none;
}

.bm-faq-breadcrumb i { font-size: 0.7rem; opacity: 0.6; }

.bm-faq-breadcrumb span[aria-current="page"] {
    color: var(--bm-text);
    font-weight: 500;
    word-break: break-word;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 575.98px) {
    .bm-faq-breadcrumb span[aria-current="page"] { max-width: 140px; }
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 991.98px) {
    .bm-faq-sections-grid { gap: 14px; }
    .bm-faq-header { padding: 24px 0 28px; }
}

@media (max-width: 767.98px) {
    .bm-faq-sections-grid { grid-template-columns: 1fr; }
    .bm-faq-search { flex-direction: column; }
    .bm-faq-search .btn { width: 100%; min-width: 0; }
    .bm-faq-section-header { gap: 12px; }
    .bm-faq-section-icon { width: 44px; height: 44px; font-size: 1.2rem; }
    .bm-faq-item { padding: 22px 20px; }
    .bm-faq-item-header { gap: 12px; }
    .bm-faq-item-icon { width: 40px; height: 40px; font-size: 1.15rem; }
    .bm-faq-item-footer { flex-direction: column; align-items: flex-start; gap: 14px; }
}

@media (max-width: 575.98px) {
    .bm-faq-wrap { padding-top: 12px; }
    .bm-faq-title { font-size: 1.4rem; }
    .bm-faq-sub { font-size: 0.9rem; }
    .bm-faq-card { padding: 16px; }
    .bm-faq-card-icon { width: 36px; height: 36px; font-size: 1rem; }
    .bm-faq-card-title { font-size: 0.975rem; }
    .bm-faq-item { padding: 18px 16px; border-radius: var(--bm-radius); }
    .bm-faq-item-answer { font-size: 0.95rem; line-height: 1.65; }
    .bm-faq-vote-block { flex-direction: column; align-items: stretch; gap: 10px; }
    .bm-faq-vote-question { white-space: normal; }
    .bm-faq-vote-btns { width: 100%; }
    .bm-faq-vote { flex: 1 1 auto; justify-content: center; }
}

/* ── RTL (Arabic / Urdu) ─────────────────────────────────── */
html[dir="rtl"] .bm-faq-header,
html[dir="rtl"] .bm-faq-title,
html[dir="rtl"] .bm-faq-sub,
html[dir="rtl"] .bm-faq-results-title,
html[dir="rtl"] .bm-faq-section-header,
html[dir="rtl"] .bm-faq-item-header,
html[dir="rtl"] .bm-faq-item-answer,
html[dir="rtl"] .bm-faq-item-meta,
html[dir="rtl"] .bm-faq-sidebar-title,
html[dir="rtl"] .bm-faq-sidebar-cta-text {
    text-align: right;
}

html[dir="rtl"] .bm-faq-item-answer { text-align: start; }

/* FAQ content may use a different script from the selected interface locale. */
.bm-faq-result-q,
.bm-faq-result-excerpt,
.bm-faq-result-section,
.bm-faq-results-title,
.bm-faq-card-title,
.bm-faq-card-desc,
.bm-faq-card-items li a span,
.bm-faq-section-title,
.bm-faq-section-desc,
.bm-faq-section-q,
.bm-faq-section-preview,
.bm-faq-item-question,
.bm-faq-item-answer {
    text-align: start;
}

html[dir="rtl"] .bm-faq-search-input > i.fa-magnifying-glass,
html[dir="rtl"] .bm-faq-search-input > i.bi-search {
    left: auto;
    right: 14px;
}

html[dir="rtl"] .bm-faq-search-input .form-control {
    padding-left: 40px;
    padding-right: 40px;
}

html[dir="rtl"] .bm-faq-search-clear {
    right: auto;
    left: 10px;
}

html[dir="rtl"] .bm-faq-breadcrumb,
html[dir="rtl"] .bm-faq-breadcrumb i {
    flex-direction: row-reverse;
}

html[dir="rtl"] .bm-faq-card-items li a i.fa-chevron-right,
html[dir="rtl"] .bm-faq-section-chevron {
    transform: scaleX(-1);
}

html[dir="rtl"] .bm-faq-section-link:hover .bm-faq-section-chevron {
    transform: scaleX(-1) translateX(-2px);
}

html[dir="rtl"] .bm-faq-card-more i.fa-arrow-right {
    transform: scaleX(-1);
}

html[dir="rtl"] .bm-faq-item-back i.fa-arrow-left {
    transform: scaleX(-1);
}

html[dir="rtl"] .bm-faq-item-answer blockquote {
    border-left: 0;
    border-right: 3px solid var(--bm-border);
    padding-left: 0;
    padding-right: 16px;
}

/* Urdu: extra line-height for readability. */
html[lang="ur"] .bm-faq-item-answer,
html[lang="ur"] .bm-faq-item-answer p,
html[lang="ur"] .bm-faq-item-answer li,
html[lang="ur"] .bm-faq-sub,
html[lang="ur"] .bm-faq-section-preview,
html[lang="ur"] .bm-faq-result-excerpt {
    line-height: 1.85;
}
