/* ============================================================
   FAQ PAGE STYLES
   East African Family Heritage
   ============================================================ */

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f2f5;
    color: #333;
    min-height: 100vh;
    line-height: 1.6;
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 24px;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: white;
}

/* Container */
.container {
    max-width: 860px;
    margin: 0 auto;
    padding: 40px 24px;
}

/* Header */
.faq-header {
    text-align: center;
    margin-bottom: 40px;
}

.faq-header h1 {
    font-size: 2.2rem;
    color: #2d3748;
    margin-bottom: 8px;
}

.faq-header .subtitle {
    color: #718096;
    font-size: 1.1rem;
    margin-bottom: 28px;
}

/* Search */
.search-box {
    position: relative;
    max-width: 480px;
    margin: 0 auto;
}

.search-box input {
    width: 100%;
    padding: 14px 20px 14px 48px;
    font-size: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.search-box input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    pointer-events: none;
}

/* Category Tabs */
.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
    justify-content: center;
}

.tab {
    padding: 8px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 2px solid #e2e8f0;
    border-radius: 24px;
    background: white;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.2s;
}

.tab:hover {
    border-color: #667eea;
    color: #667eea;
}

.tab.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: transparent;
}

/* FAQ Category Section */
.faq-category {
    margin-bottom: 36px;
}

.category-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
}

.category-header h2 {
    font-size: 1.4rem;
    color: #2d3748;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.badge {
    display: inline-block;
    background: #edf2f7;
    color: #667eea;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    vertical-align: middle;
    margin-left: 8px;
}

.category-desc {
    color: #718096;
    font-size: 0.92rem;
    margin-top: 4px;
}

/* FAQ Item (Accordion) */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.faq-item {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.faq-item:hover {
    border-color: #cbd5e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.faq-item.open {
    border-color: #667eea;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.1);
}

/* Question Button */
.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    font-size: 1rem;
    font-weight: 600;
    color: #2d3748;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    gap: 16px;
    transition: color 0.2s;
}

.faq-question:hover {
    color: #667eea;
}

.faq-item.open .faq-question {
    color: #667eea;
}

.chevron {
    font-size: 1.2rem;
    color: #a0aec0;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.faq-item.open .chevron {
    transform: rotate(90deg);
    color: #667eea;
}

/* Answer Panel */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.faq-item.open .faq-answer {
    max-height: 600px;
}

.answer-content {
    padding: 0 20px 20px 20px;
    color: #4a5568;
    font-size: 0.95rem;
    line-height: 1.75;
}

/* Markdown-like styling within answers */
.answer-content strong {
    color: #2d3748;
    font-weight: 700;
}

.answer-content code {
    background: #edf2f7;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.88em;
    color: #667eea;
    font-family: 'Consolas', 'Courier New', monospace;
}

.answer-content ul,
.answer-content ol {
    margin: 8px 0 8px 20px;
}

.answer-content li {
    margin-bottom: 4px;
}

.answer-content p {
    margin-bottom: 10px;
}

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

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #a0aec0;
}

.no-results-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.no-results p {
    font-size: 1.1rem;
    margin-bottom: 16px;
}

.clear-search {
    padding: 10px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #667eea;
    background: white;
    border: 2px solid #667eea;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.clear-search:hover {
    background: #667eea;
    color: white;
}

/* Footer */
.footer {
    text-align: center;
    padding: 24px;
    color: #a0aec0;
    font-size: 0.85rem;
}

.footer a {
    color: #667eea;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 640px) {
    .navbar {
        padding: 12px 16px;
        flex-direction: column;
        gap: 8px;
    }

    .nav-links {
        gap: 16px;
    }

    .container {
        padding: 24px 16px;
    }

    .faq-header h1 {
        font-size: 1.6rem;
    }

    .category-tabs {
        gap: 6px;
    }

    .tab {
        padding: 6px 14px;
        font-size: 0.82rem;
    }

    .faq-question {
        padding: 14px 16px;
        font-size: 0.93rem;
    }

    .answer-content {
        padding: 0 16px 16px 16px;
        font-size: 0.9rem;
    }
}
