/**
 * FAQ Page Styles
 * Template: page-faq.php
 * Design: Search-First (V5)
 */

/* ==========================================================================
   FAQ Hero with Search
   ========================================================================== */

.faq-hero {
    background: linear-gradient(135deg, var(--mint-light) 0%, #d4e9ed 100%);
    padding: 60px 0;
    text-align: center;
}

.faq-hero p {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 32px;
}

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

.search-input {
    width: 100%;
    padding: 18px 70px 18px 65px !important;
    font-family: var(--font-primary);
    font-size: 16px;
    border: 2px solid var(--bg-white);
    border-radius: var(--radius-full);
    background: var(--bg-white);
    box-shadow: var(--shadow-lg);
    outline: none;
    transition: all var(--transition-base);
}

.search-input:focus {
    border-color: var(--mint);
}

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

.search-icon {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    stroke: var(--text-muted);
    fill: none;
    stroke-width: 2;
    pointer-events: none;
}

.search-clear {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-subtle);
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-base);
}

.search-clear.visible {
    display: flex;
}

.search-clear:hover {
    background: var(--border-light);
}

.search-clear svg {
    width: 16px;
    height: 16px;
    stroke: var(--text-muted);
    fill: none;
    stroke-width: 2;
}

/* Quick Links */
.quick-links {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.quick-link {
    padding: 8px 16px;
    background: rgba(255,255,255,0.6);
    border: 1px solid rgba(255,255,255,0.8);
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-base);
    font-family: var(--font-primary);
}

.quick-link:hover {
    background: var(--bg-white);
    color: var(--navy);
}

/* ==========================================================================
   FAQ Results Section
   ========================================================================== */

.faq-results {
    padding: 48px 0 80px;
}

.results-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.results-count {
    font-size: 14px;
    color: var(--text-muted);
}

.results-count strong {
    color: var(--text-primary);
}

/* Filter Pills */
.filter-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-pill {
    padding: 6px 14px;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-base);
    font-family: var(--font-primary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.filter-pill:hover {
    border-color: var(--mint);
    color: var(--mint);
}

.filter-pill.active {
    background: var(--navy);
    border-color: var(--navy);
    color: var(--text-inverse);
}

.pill-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: rgba(255,255,255,0.2);
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
}

.filter-pill:not(.active) .pill-count {
    background: var(--bg-subtle);
    color: var(--text-muted);
}

/* ==========================================================================
   FAQ List
   ========================================================================== */

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    overflow: hidden;
    transition: all var(--transition-base);
}

.faq-item:hover {
    box-shadow: var(--shadow-md);
}

.faq-item.active {
    border-color: var(--mint);
    box-shadow: var(--shadow-lg);
}

.faq-item.hidden {
    display: none;
}

.faq-header {
    display: flex;
    gap: 16px;
    padding: 20px 24px;
    cursor: pointer;
    align-items: flex-start;
}

.faq-number {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    background: var(--bg-subtle);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    transition: all var(--transition-base);
}

.faq-item.active .faq-number {
    background: var(--mint);
    color: white;
}

.faq-question-wrap {
    flex-grow: 1;
    min-width: 0;
}

.faq-question {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.4;
}

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

.faq-tag {
    padding: 2px 8px;
    background: var(--mint-light);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--mint-hover);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.faq-toggle {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.faq-toggle svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-muted);
    fill: none;
    stroke-width: 2;
    transition: transform var(--transition-slow), stroke var(--transition-slow);
}

.faq-item.active .faq-toggle svg {
    transform: rotate(180deg);
    stroke: var(--mint);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow) ease-out;
}

.faq-answer-content {
    padding: 0 24px 24px 72px;
    color: var(--text-secondary);
    line-height: 1.7;
}

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

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

.faq-answer-content ul {
    margin: 12px 0;
    padding-left: 20px;
}

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

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

.faq-item.active .faq-answer {
    max-height: 800px;
}

/* ==========================================================================
   No Results
   ========================================================================== */

.no-results {
    text-align: center;
    padding: 60px 24px;
    display: none;
}

.no-results.visible {
    display: block;
}

.no-results-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: var(--bg-subtle);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.no-results-icon svg {
    width: 32px;
    height: 32px;
    stroke: var(--text-muted);
    fill: none;
    stroke-width: 2;
}

.no-results h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.no-results p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all var(--transition-base);
    cursor: pointer;
    background: transparent;
    color: var(--navy);
    border: 2px solid var(--border-light);
}

.btn-outline:hover {
    border-color: var(--navy);
}

/* No FAQs Message */
.no-faqs {
    text-align: center;
    padding: 60px 24px;
    background: var(--bg-subtle);
    border-radius: var(--radius-lg);
}

.no-faqs p {
    color: var(--text-secondary);
    font-size: 16px;
}

/* ==========================================================================
   FAQ CTA
   ========================================================================== */

.faq-cta {
    margin-top: 48px;
    text-align: center;
    padding: 32px;
    background: var(--navy);
    border-radius: var(--radius-lg);
}

.faq-cta p {
    color: rgba(255,255,255,0.8);
    margin: 0;
}

.faq-cta a {
    color: var(--mint);
    font-weight: 600;
    text-decoration: none;
    transition: color var(--transition-base);
}

.faq-cta a:hover {
    color: var(--mint-hover);
    text-decoration: underline;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .faq-hero {
        padding: 48px 0;
    }

    .search-box {
        max-width: 100%;
    }

    .results-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .filter-pills {
        overflow-x: auto;
        flex-wrap: nowrap;
        width: 100%;
        padding-bottom: 8px;
    }

    .filter-pill {
        flex-shrink: 0;
    }

    .faq-header {
        padding: 16px 20px;
    }

    .faq-answer-content {
        padding-left: 20px;
        padding-right: 20px;
    }

    .faq-cta {
        padding: 24px 20px;
    }
}

@media (max-width: 480px) {
    .faq-hero p {
        font-size: 14px;
    }

    .search-input {
        font-size: 15px;
        padding: 16px 56px 16px 50px !important;
    }

    .quick-links {
        gap: 6px;
    }

    .quick-link {
        padding: 6px 12px;
        font-size: 12px;
    }

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

    .faq-number {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
}
