/* ============================================================
   FAQ Page Styles — WizData
   Inherits CSS variables and base styles from index.css
   ============================================================ */

/* ── Hero ── */
.faq-hero {
    position: relative;
    padding: 160px 0 110px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 50%, #5c6bc0 100%);
    color: white;
    overflow: hidden;
}

.faq-hero-bg {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.07) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
    z-index: 0;
}

.faq-hero .container {
    position: relative;
    z-index: 1;
}

/* Reuse eyebrow / subtitle classes from resources.css */
.hero-eyebrow {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: var(--accent-color);
    margin-bottom: 16px;
}

.hero-subtitle {
    font-size: 1.15rem;
    line-height: 1.7;
    opacity: 0.92;
    max-width: 580px;
    margin-left: auto;
    margin-right: auto;
}

/* ── Search Bar ── */
.faq-search-wrapper {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.faq-search-inner {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50px;
    backdrop-filter: blur(12px);
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.faq-search-inner:focus-within {
    background: rgba(255, 255, 255, 0.22);
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(0, 188, 212, 0.2);
}

.faq-search-icon {
    position: absolute;
    left: 20px;
    font-size: 1.1rem;
    color: rgba(255,255,255,0.75);
    pointer-events: none;
}

.faq-search-input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    padding: 16px 52px 16px 52px;
    font-size: 1rem;
    color: white;
    border-radius: 50px;
}

.faq-search-input::placeholder {
    color: rgba(255,255,255,0.6);
}

.faq-search-clear {
    position: absolute;
    right: 16px;
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.2s ease;
    padding: 0;
    line-height: 1;
}

.faq-search-clear:hover {
    background: rgba(255,255,255,0.3);
}

.faq-search-hint {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.75);
    text-align: center;
    min-height: 1.5em;
}

/* ── Category Navigation ── */
.faq-cat-nav {
    position: sticky;
    top: 76px; /* matches navbar height */
    z-index: 100;
    background: rgba(255,255,255,0.97);
    border-bottom: 1px solid rgba(26, 35, 126, 0.1);
    backdrop-filter: blur(12px);
    padding: 14px 0;
    box-shadow: 0 4px 20px rgba(26, 35, 126, 0.07);
}

.faq-cat-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    /* Keep pills from wrapping on wider screens */
    white-space: nowrap;
}

.faq-cat-list::-webkit-scrollbar {
    display: none;
}

.faq-cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    color: #555;
    background: transparent;
    border: 1.5px solid transparent;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.faq-cat-pill i {
    font-size: 0.95rem;
}

.faq-cat-pill:hover {
    color: var(--primary-color);
    background: rgba(26, 35, 126, 0.06);
    border-color: rgba(26, 35, 126, 0.15);
}

.faq-cat-pill.active {
    color: var(--primary-color);
    background: rgba(26, 35, 126, 0.08);
    border-color: var(--primary-color);
}

/* ── FAQ Body ── */
.faq-body {
    background: #f7f8fc;
    padding: 72px 0 80px;
}

/* ── Category Section ── */
.faq-category {
    margin-bottom: 72px;
}

.faq-category:last-of-type {
    margin-bottom: 0;
}

/* Category header row */
.faq-cat-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(26, 35, 126, 0.08);
}

.faq-cat-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: var(--accent-color);
    margin-bottom: 4px;
}

.faq-cat-title {
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

/* Category icon badge */
.faq-cat-icon-wrap {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.faq-cat-icon-wrap.product-icon {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.faq-cat-icon-wrap.why-icon {
    background: linear-gradient(135deg, #e65100, #f57c00);
}

.faq-cat-icon-wrap.security-icon {
    background: linear-gradient(135deg, #1b5e20, #2e7d32);
}

.faq-cat-icon-wrap.deployment-icon {
    background: linear-gradient(135deg, #4a148c, #6a1b9a);
}

/* ── Accordion (FAQ items) ── */
.faq-accordion {
    --bs-accordion-border-radius: 14px;
    --bs-accordion-inner-border-radius: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.faq-item {
    border: 1px solid rgba(26, 35, 126, 0.1) !important;
    border-radius: 14px !important;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.faq-item:hover {
    border-color: rgba(26, 35, 126, 0.22) !important;
    box-shadow: 0 4px 18px rgba(26, 35, 126, 0.07);
}

/* Highlighted / search match */
.faq-item.faq-match {
    border-color: var(--accent-color) !important;
    box-shadow: 0 4px 18px rgba(0, 188, 212, 0.18);
}

.faq-item.faq-hidden {
    display: none;
}

/* Accordion button */
.faq-accordion .accordion-button {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark-color);
    background: #fff;
    padding: 20px 24px;
    border-radius: 14px !important;
    box-shadow: none !important;
    transition: color 0.2s ease, background 0.2s ease;
}

.faq-accordion .accordion-button:not(.collapsed) {
    color: var(--primary-color);
    background: rgba(26, 35, 126, 0.03);
    border-bottom: 1px solid rgba(26, 35, 126, 0.08);
    border-radius: 14px 14px 0 0 !important;
}

/* Custom chevron */
.faq-accordion .accordion-button::after {
    filter: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%231a237e' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    width: 18px;
    height: 18px;
    background-size: 18px;
    flex-shrink: 0;
}

/* Accordion body */
.faq-accordion .accordion-body {
    font-size: 0.96rem;
    line-height: 1.75;
    color: #444;
    padding: 20px 24px 24px;
    background: #fff;
}

.faq-accordion .accordion-body a {
    color: var(--secondary-color);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

.faq-accordion .accordion-body a:hover {
    color: var(--primary-color);
}

/* List inside accordion body */
.faq-list {
    padding-left: 1.25rem;
    margin-bottom: 0;
}

.faq-list li {
    margin-bottom: 8px;
}

.faq-list li:last-child {
    margin-bottom: 0;
}

/* ── Highlighted search terms ── */
mark.faq-highlight {
    background: rgba(0, 188, 212, 0.2);
    color: inherit;
    border-radius: 3px;
    padding: 0 2px;
}

/* ── No Results ── */
.faq-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #777;
}

.faq-no-results i {
    font-size: 3rem;
    color: #ccc;
    margin-bottom: 16px;
    display: block;
}

.faq-no-results a {
    color: var(--secondary-color);
}

/* ── CTA Section ── */
.faq-cta {
    position: relative;
    padding: 100px 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, #5c6bc0 50%, #667eea 100%);
    color: white;
    overflow: hidden;
    text-align: center;
}

.faq-cta-bg {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
}

.faq-cta-icon {
    width: 72px;
    height: 72px;
    background: rgba(255,255,255,0.12);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    border: 1px solid rgba(255,255,255,0.2);
}

.faq-cta .btn-outline-light:hover {
    background: white;
    color: var(--primary-color);
}

/* ── Scroll-to-top button ── */
#scrollToTop {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 46px;
    height: 46px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(26, 35, 126, 0.35);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease;
    pointer-events: none;
    z-index: 500;
}

#scrollToTop.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#scrollToTop:hover {
    background: var(--secondary-color);
}

/* ── Responsive ── */
@media (max-width: 991px) {
    .faq-hero {
        padding: 140px 0 90px;
    }

    .faq-body {
        padding: 56px 0 64px;
    }

    .faq-cat-nav {
        top: 70px;
    }

    .faq-cat-list {
        gap: 6px;
    }

    .faq-cat-pill {
        font-size: 0.82rem;
        padding: 7px 14px;
    }

    .faq-category {
        margin-bottom: 56px;
    }
}

@media (max-width: 767px) {
    .faq-hero {
        padding: 130px 0 80px;
    }

    .faq-hero .display-4 {
        font-size: 2rem;
    }

    .faq-cat-header {
        gap: 14px;
    }

    .faq-cat-icon-wrap {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
        border-radius: 13px;
    }

    .faq-cat-title {
        font-size: 1.3rem;
    }

    .faq-accordion .accordion-button {
        font-size: 0.95rem;
        padding: 16px 18px;
    }

    .faq-accordion .accordion-body {
        font-size: 0.93rem;
        padding: 16px 18px 20px;
    }

    .faq-cta {
        padding: 70px 0;
    }

    #scrollToTop {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}