/**
 * Qulbay Child Theme — FAQ Page Styles
 * Template: page-faq.php
 * RUN_ID: QLB-PUBLIC-PAGES-FAQ-01
 * Version: 1.0.0
 *
 * UI system: IDENTICAL to terms.css / about.css — same tokens, same nav,
 * same rainbow strip, same footer, same body scoping pattern.
 * Font: Poppins (loaded in template <head>)
 * No inline CSS anywhere — all rules here.
 */

/* ── Design tokens (mirrors terms.css exactly) ──────────────────────────── */
:root {
    --qlb-faq-deep-purple:  #4B0082;
    --qlb-faq-apple-green:  #8DB600;
    --qlb-faq-yellow:       #FFD700;
    --qlb-faq-pink:         #E91E63;
    --qlb-faq-orange:       #FF5722;
    --qlb-faq-blue:         #00BCD4;
    --qlb-faq-off-white:    #F4F7F2;
    --qlb-faq-text:         #1A1A1A;
    --qlb-faq-gradient: linear-gradient(
        90deg,
        #FFD700 0%,    #FFD700 16.6%,
        #E91E63 16.6%, #E91E63 33.3%,
        #FF5722 33.3%, #FF5722 50%,
        #8DB600 50%,   #8DB600 66.6%,
        #00BCD4 66.6%, #00BCD4 83.3%,
        #4B0082 83.3%, #4B0082 100%
    );
}

/* ── Reset (scoped to body class) ──────────────────────────────────────── */
body.qlb-faq *,
body.qlb-faq *::before,
body.qlb-faq *::after {
    box-sizing: border-box;
}

body.qlb-faq {
    background: var(--qlb-faq-off-white);
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    color: var(--qlb-faq-text);
    -webkit-font-smoothing: antialiased;
}

/* Hide TT25 chrome (same pattern as terms.css) */
body.qlb-faq .wp-site-blocks > header,
body.qlb-faq .wp-site-blocks > footer,
body.qlb-faq .wp-block-template-part[data-slug="header"],
body.qlb-faq .wp-block-template-part[data-slug="footer"],
body.qlb-faq .wp-site-blocks {
    padding: 0 !important;
    margin: 0 !important;
}
body.qlb-faq .wp-site-blocks > header,
body.qlb-faq .wp-site-blocks > footer,
body.qlb-faq .site-header,
body.qlb-faq .site-footer,
body.qlb-faq #masthead,
body.qlb-faq #colophon {
    display: none !important;
}

/* ── Truck-art rainbow strip (fixed top) ───────────────────────────────── */
.qlb-faq-truck-border {
    height: 8px;
    background: var(--qlb-faq-gradient);
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
}

/* ── NAV — identical to terms.css / about.css nav ──────────────────────── */
/* .qlb-nav, .qlb-logo, etc. shared rules already defined in terms.css / about.css
   but we scope here fully since each template loads only its own CSS. */
body.qlb-faq .qlb-nav {
    position: sticky;
    top: 8px;
    z-index: 1000;
    background: #0b0b0b;
    height: 64px;
    display: flex;
    align-items: center;
}

body.qlb-faq .qlb-nav .qlb-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

body.qlb-faq .qlb-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

body.qlb-faq .qlb-logo-box {
    width: 40px;
    height: 40px;
    border: 2px solid #ffffff;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.qlb-faq .qlb-logo-box span {
    font-family: 'Poppins', sans-serif;
    font-weight: 900;
    font-size: 0.85rem;
    color: #ffffff;
    letter-spacing: 0.05em;
}

body.qlb-faq .qlb-logo-text {
    font-family: 'Poppins', sans-serif;
    font-weight: 900;
    font-size: 1.2rem;
    color: #ffffff;
    letter-spacing: 0.06em;
}

body.qlb-faq .qlb-nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

body.qlb-faq .qlb-nav-links a {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 999px;
    transition: color 0.15s, background 0.15s;
    text-decoration: none;
}

body.qlb-faq .qlb-nav-links a:hover,
body.qlb-faq .qlb-nav-links a.qlb-nav-active {
    color: #FFD700;
    background: rgba(255, 215, 0, 0.08);
}

/* Hamburger — mobile only */
body.qlb-faq .qlb-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

body.qlb-faq .qlb-hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #ffffff;
    border-radius: 2px;
    transition: opacity 0.2s;
}

/* Mobile menu */
body.qlb-faq .qlb-mobile-menu {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    width: 100%;
    background: #0b0b0b;
    z-index: 999;
    padding: 16px 20px 24px;
    flex-direction: column;
    gap: 4px;
}

body.qlb-faq .qlb-mobile-menu.open {
    display: flex;
}

body.qlb-faq .qlb-mobile-menu a {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    font-weight: 600;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    text-decoration: none;
}

body.qlb-faq .qlb-mobile-menu a:last-child {
    border-bottom: none;
}

@media (max-width: 767px) {
    body.qlb-faq .qlb-nav-links {
        display: none;
    }
    body.qlb-faq .qlb-hamburger {
        display: flex;
    }
}

/* ── Page wrapper ───────────────────────────────────────────────────────── */
.qlb-faq-page {
    padding-top: 8px; /* rainbow strip height */
}

/* ── Hero band — deep purple + ❓ watermark ─────────────────────────────── */
.qlb-faq-hero {
    background: var(--qlb-faq-deep-purple);
    padding: 28px 5% 56px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.qlb-faq-hero::before {
    content: '❓';
    position: absolute;
    font-size: 280px;
    color: rgba(255, 215, 0, 0.04);
    top: -40px;
    right: -20px;
    pointer-events: none;
    line-height: 1;
}

.qlb-faq-hero-tag {
    display: inline-block;
    background: var(--qlb-faq-yellow);
    color: var(--qlb-faq-deep-purple);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 3px;
    text-transform: uppercase;
    padding: 5px 16px;
    border-radius: 20px;
    margin-bottom: 20px;
}

.qlb-faq-hero h1 {
    font-family: 'Poppins', sans-serif;
    color: #ffffff;
    font-size: clamp(1.8rem, 4.5vw, 3rem);
    font-weight: 800;
    margin: 0 0 14px;
    line-height: 1.15;
}

.qlb-faq-hero h1 em {
    color: var(--qlb-faq-yellow);
    font-style: normal;
}

.qlb-faq-hero p {
    color: rgba(255, 255, 255, 0.78);
    font-size: 1.05rem;
    max-width: 560px;
    margin: 0 auto 20px;
    line-height: 1.65;
}

/* Hero search bar */
.qlb-faq-search-wrap {
    max-width: 480px;
    margin: 0 auto;
    position: relative;
}

.qlb-faq-search-wrap::before {
    content: '🔍';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.95rem;
    pointer-events: none;
}

#qlb-faq-search {
    width: 100%;
    padding: 13px 18px 13px 44px;
    border-radius: 999px;
    border: none;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    outline: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    color: var(--qlb-faq-text);
    background: #ffffff;
}

#qlb-faq-search::placeholder {
    color: #9CA3AF;
}

/* ── Main section — sidebar + accordion ────────────────────────────────── */
.qlb-faq-section {
    max-width: 1100px;
    margin: -32px auto 0;
    padding: 0 5% 72px;
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 32px;
    align-items: start;
}

/* ── Sidebar — white card, same as terms TOC ───────────────────────────── */
.qlb-faq-sidebar {
    position: sticky;
    top: calc(8px + 64px + 16px); /* rainbow + nav + gap */
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.qlb-faq-filter-card {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.09);
    border-bottom: 4px solid var(--qlb-faq-deep-purple);
    padding: 24px 20px;
}

.qlb-faq-filter-card h3 {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--qlb-faq-deep-purple);
    margin: 0 0 16px;
}

.qlb-faq-cat-btn {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--qlb-faq-text);
    padding: 8px 10px;
    border-radius: 8px;
    margin-bottom: 4px;
    transition: background 0.15s, color 0.15s;
}

.qlb-faq-cat-btn:hover,
.qlb-faq-cat-btn.qlb-faq-active {
    background: rgba(75, 0, 130, 0.07);
    color: var(--qlb-faq-deep-purple);
}

.qlb-faq-cat-btn .qlb-faq-cat-icon {
    margin-right: 6px;
}

/* CTA card in sidebar */
.qlb-faq-cta-card {
    background: var(--qlb-faq-deep-purple);
    border-radius: 14px;
    padding: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.qlb-faq-cta-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--qlb-faq-gradient);
    opacity: 0.08;
    pointer-events: none;
}

.qlb-faq-cta-card p {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.82);
    margin: 0 0 14px;
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

.qlb-faq-cta-btn {
    display: inline-block;
    background: var(--qlb-faq-yellow);
    color: var(--qlb-faq-deep-purple);
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 0.82rem;
    padding: 10px 20px;
    border-radius: 999px;
    text-decoration: none;
    transition: background 0.18s, transform 0.18s;
    position: relative;
    z-index: 1;
}

.qlb-faq-cta-btn:hover {
    background: #e6c200;
    transform: translateY(-2px);
    text-decoration: none;
    color: var(--qlb-faq-deep-purple);
}

/* ── FAQ accordion items ────────────────────────────────────────────────── */
.qlb-faq-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* <details> accordion card */
.qlb-faq-item {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.09);
    border-bottom: 4px solid var(--qlb-faq-apple-green);
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.qlb-faq-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.11);
}

/* Colour variants — bottom border per category */
.qlb-faq-item--purple { border-bottom-color: var(--qlb-faq-deep-purple); }
.qlb-faq-item--pink   { border-bottom-color: var(--qlb-faq-pink); }
.qlb-faq-item--orange { border-bottom-color: var(--qlb-faq-orange); }
.qlb-faq-item--blue   { border-bottom-color: var(--qlb-faq-blue); }
.qlb-faq-item--green  { border-bottom-color: var(--qlb-faq-apple-green); }

/* <summary> row — number circle + question + chevron */
.qlb-faq-q {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 24px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

/* Remove default marker */
.qlb-faq-q::-webkit-details-marker { display: none; }
.qlb-faq-q::marker { display: none; }

.qlb-faq-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--qlb-faq-deep-purple);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 0.78rem;
    flex-shrink: 0;
}

.qlb-faq-q-text {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--qlb-faq-deep-purple);
    line-height: 1.3;
}

.qlb-faq-chevron {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--qlb-faq-deep-purple);
    transition: transform 0.2s;
    font-size: 0.8rem;
}

/* Rotate chevron when open */
.qlb-faq-item[open] .qlb-faq-chevron {
    transform: rotate(180deg);
}

/* Answer panel */
.qlb-faq-answer {
    padding: 0 24px 22px 70px; /* left: 32px num + 14px gap + 24px base */
    font-size: 13.5px;
    color: #444;
    line-height: 1.78;
    border-top: 1px solid #f0e6ff;
}

.qlb-faq-answer p {
    margin: 12px 0 0;
}

.qlb-faq-answer p:last-child {
    margin-bottom: 0;
}

.qlb-faq-answer ul,
.qlb-faq-answer ol {
    padding-left: 20px;
    margin: 8px 0;
}

.qlb-faq-answer li {
    margin-bottom: 4px;
    line-height: 1.7;
}

.qlb-faq-answer strong {
    color: var(--qlb-faq-text);
    font-weight: 700;
}

.qlb-faq-answer a {
    color: var(--qlb-faq-deep-purple);
    text-decoration: underline;
}

.qlb-faq-answer a:hover {
    text-decoration: none;
}

/* No results message */
.qlb-faq-empty {
    text-align: center;
    padding: 48px 20px;
    color: #888;
    font-size: 0.95rem;
    display: none;
}

.qlb-faq-empty strong {
    display: block;
    font-size: 1.4rem;
    margin-bottom: 8px;
}

/* JS filter — hidden class */
.qlb-hidden {
    display: none !important;
}

/* ── CTA band at bottom — mirrors terms acceptance strip ───────────────── */
.qlb-faq-cta-band {
    background: var(--qlb-faq-deep-purple);
    border-radius: 16px;
    padding: 48px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-top: 32px;
}

.qlb-faq-cta-band::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--qlb-faq-gradient);
    opacity: 0.08;
    pointer-events: none;
}

.qlb-faq-cta-band-tag {
    display: inline-block;
    background: var(--qlb-faq-yellow);
    color: var(--qlb-faq-deep-purple);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 3px;
    text-transform: uppercase;
    padding: 5px 16px;
    border-radius: 20px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.qlb-faq-cta-band h2 {
    font-family: 'Poppins', sans-serif;
    color: #ffffff;
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 800;
    margin: 0 0 14px;
    position: relative;
    z-index: 1;
}

.qlb-faq-cta-band p {
    color: rgba(255, 255, 255, 0.82);
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto 24px;
    line-height: 1.65;
    position: relative;
    z-index: 1;
}

.qlb-faq-cta-band-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--qlb-faq-yellow);
    color: var(--qlb-faq-deep-purple);
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 0.95rem;
    padding: 13px 28px;
    border-radius: 999px;
    text-decoration: none;
    transition: background 0.18s ease, transform 0.18s ease;
    position: relative;
    z-index: 1;
}

.qlb-faq-cta-band-btn:hover {
    background: #e6c200;
    transform: translateY(-2px);
    text-decoration: none;
    color: var(--qlb-faq-deep-purple);
}

/* ── Footer — identical to terms footer ─────────────────────────────────── */
.qlb-faq-footer {
    background: #0b0b0b;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    font-size: 12.5px;
    padding: 24px 20px;
}

.qlb-faq-footer a {
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    transition: color 0.15s;
}

.qlb-faq-footer a:hover {
    color: var(--qlb-faq-yellow);
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
    .qlb-faq-section {
        grid-template-columns: 1fr;
    }
    .qlb-faq-sidebar {
        position: static;
    }
    /* Show filter buttons horizontally on tablet */
    .qlb-faq-filter-card {
        border-bottom: none;
        box-shadow: none;
        background: transparent;
        padding: 0;
    }
    .qlb-faq-filter-card h3 {
        margin-bottom: 8px;
    }
    .qlb-faq-cat-btn {
        display: inline-block;
        width: auto;
        margin: 0 4px 8px 0;
        border: 1.5px solid rgba(75, 0, 130, 0.2);
    }
    .qlb-faq-cta-card {
        display: none;
    }
}

@media (max-width: 640px) {
    .qlb-faq-hero {
        padding: 28px 5% 40px;
    }
    .qlb-faq-section {
        padding: 0 5% 48px;
    }
    .qlb-faq-q {
        padding: 16px 18px;
    }
    .qlb-faq-answer {
        padding: 0 18px 18px 66px;
    }
    .qlb-faq-cta-band {
        padding: 36px 24px;
    }
}
