/* ═══════════════════════════════════════════════════════════════
   Sciences Gates - FAQ Page Dedicated Styles
   Strict adherence to :root variables, flat colors, zero gradients.
   ═══════════════════════════════════════════════════════════════ */

.faq-page-wrapper {
    background-color: var(--bg-page);
    min-height: 60vh;
    padding-top: 36px;
    padding-bottom: 56px;
}

.faq-controls-container {
    width: 100%;
    max-width: 1300px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 16px;
    padding-right: 16px;
    margin-bottom: 24px;
}

.faq-content-container,
.faq-container {
    width: 100%;
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 16px;
    padding-right: 16px;
}

/* ── Control Card (Search + Filters) ── */
.faq-controls-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 0;
    box-shadow: var(--shadow-sm);
}

.faq-search-box {
    position: relative;
    margin-bottom: 20px;
}

.faq-search-input-group {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.faq-search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.faq-search-input {
    width: 100%;
    padding: 13px 44px 13px 44px;
    background-color: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.5;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.faq-search-input:focus {
    background-color: var(--surface);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.faq-search-input::placeholder {
    color: var(--text-muted);
}

.faq-search-clear {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.faq-search-clear:hover {
    color: var(--danger);
    background-color: var(--danger-light);
}

/* ── Filter Pills ── */
.faq-pills-scroll {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.faq-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 9999px;
    color: var(--text-secondary);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    user-select: none;
}

.faq-pill-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.faq-pill-btn.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.faq-pill-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--border);
    color: var(--text-secondary);
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.faq-pill-btn.active .faq-pill-count {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
}

/* ── Results Meta Bar ── */
.faq-meta-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px;
    margin-bottom: 16px;
    font-size: 13.5px;
    color: var(--text-secondary);
}

.faq-active-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.faq-active-filter-label {
    font-weight: 500;
}

.faq-active-filter-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 9999px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
}

.faq-meta-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.faq-meta-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 2px 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s ease;
}

.faq-meta-btn:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.faq-meta-divider {
    color: var(--border-strong);
}

/* ── FAQ Accordion List & Cards ── */
.faq-accordion-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-card:hover {
    border-color: var(--border-strong);
}

.faq-card.is-open {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.faq-card-header {
    width: 100%;
    text-align: right;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: none;
    border: none;
    cursor: pointer;
    user-select: none;
}

.faq-card-title-wrap {
    flex: 1;
    min-width: 0;
}

.faq-badges-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.faq-badge-category {
    font-size: 11.5px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 9999px;
    background: var(--primary-light);
    color: var(--primary);
}

.faq-badge-featured {
    font-size: 11.5px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 9999px;
    background: var(--secondary-light);
    color: var(--secondary);
}

.faq-card-question {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.5;
}

.faq-chevron-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.25s ease, background-color 0.2s ease, color 0.2s ease;
}

.faq-card.is-open .faq-chevron-icon {
    transform: rotate(180deg);
    background: var(--primary);
    color: var(--white);
}

/* ── FAQ Body & Rich Content ── */
.faq-card-body {
    display: none;
    padding: 0 20px 20px 20px;
    border-top: 1px solid var(--border);
}

.faq-card.is-open .faq-card-body {
    display: block;
}

.faq-rich-content {
    padding-top: 16px;
    color: var(--text-secondary);
    font-size: 14.5px;
    line-height: 1.8;
}

.faq-rich-content p {
    margin-top: 0;
    margin-bottom: 12px;
}

.faq-rich-content p:last-child {
    margin-bottom: 0;
}

.faq-rich-content ul, 
.faq-rich-content ol {
    margin: 10px 0;
    padding-right: 22px;
}

.faq-rich-content li {
    margin-bottom: 6px;
}

.faq-rich-content strong {
    color: var(--text-primary);
    font-weight: 700;
}

.faq-rich-content a {
    color: var(--info);
    text-decoration: underline;
}

.faq-highlight {
    background-color: var(--warning-light);
    color: var(--text-primary);
    padding: 0 2px;
    border-radius: 2px;
    font-weight: 700;
}

/* ── Card Footer Utilities ── */
.faq-card-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    font-size: 12.5px;
    color: var(--text-muted);
}

.faq-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    background: var(--bg-light);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.faq-share-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

.faq-feedback-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.faq-feedback-btn {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.faq-feedback-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

.faq-feedback-thanks {
    color: var(--success);
    font-weight: 600;
}

/* ── Empty State ── */
.faq-empty-state {
    display: none;
    text-align: center;
    padding: 48px 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-top: 16px;
}

.faq-empty-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px auto;
    font-size: 24px;
}

.faq-empty-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.faq-empty-desc {
    color: var(--text-secondary);
    font-size: 14px;
    max-width: 440px;
    margin: 0 auto 24px auto;
    line-height: 1.6;
}

.faq-empty-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.faq-empty-btn-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    background: var(--bg-light);
    border: 1px solid var(--border-strong);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.faq-empty-btn-reset:hover {
    background: var(--border);
}

.faq-empty-btn-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    background: var(--whatsapp-green);
    border: 1px solid var(--whatsapp-green);
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s ease;
    text-decoration: none;
}

.faq-empty-btn-whatsapp:hover {
    opacity: 0.9;
}

/* ── Mobile Responsive Refinements ── */
@media (max-width: 640px) {
    .faq-controls-card {
        padding: 16px;
    }

    .faq-card-header {
        padding: 14px 16px;
    }

    .faq-card-body {
        padding: 0 16px 16px 16px;
    }

    .faq-card-question {
        font-size: 15px;
    }

    .faq-card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}
