/**
 * FAQ Page Styles
 * Accordion, search, filters, and responsive design
 */

/* FAQ Hero */
.faq-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0 3rem;
    text-align: center;
}

.faq-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.faq-intro {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* Search Container */
.faq-search-container {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

#faq-search {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    font-size: 1rem;
    border: none;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.3s;
}

#faq-search:focus {
    outline: none;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    pointer-events: none;
}

/* FAQ Main */
.faq-main {
    padding: 3rem 0;
}

/* Category Filters */
.faq-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #eee;
}

.faq-category-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid #ddd;
    background: white;
    color: #666;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
}

.faq-category-btn:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
}

.faq-category-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

/* Results Count */
.faq-results-count {
    text-align: center;
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    font-style: italic;
}

/* FAQ Accordion */
.faq-accordion {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border-radius: 12px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: box-shadow 0.3s, transform 0.3s;
}

.faq-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.faq-question {
    width: 100%;
    padding: 1.5rem 1.5rem 1.5rem 1rem;
    background: white;
    border: none;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    transition: background 0.3s;
}

.faq-question:hover {
    background: #f8f9fa;
}

.faq-question span {
    flex: 1;
}

.faq-icon {
    flex-shrink: 0;
    transition: transform 0.3s;
    color: #667eea;
}

.faq-question[aria-expanded="true"] .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-answer > * {
    padding: 0 1.5rem 1.5rem;
}

.faq-answer p {
    color: #555;
    line-height: 1.7;
    margin-bottom: 1rem;
}

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

.faq-answer ul,
.faq-answer ol {
    color: #555;
    line-height: 1.7;
    margin: 1rem 0;
    padding-left: 2rem;
}

.faq-answer li {
    margin-bottom: 0.5rem;
}

.faq-answer strong {
    color: #2c3e50;
    font-weight: 600;
}

.faq-answer a {
    color: #667eea;
    text-decoration: none;
    border-bottom: 1px solid rgba(102, 126, 234, 0.3);
    transition: border-color 0.3s;
}

.faq-answer a:hover {
    border-bottom-color: #667eea;
}

/* No Results */
.faq-no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
}

.faq-no-results p {
    margin-bottom: 1rem;
}

.btn-link {
    background: none;
    border: none;
    color: #667eea;
    text-decoration: underline;
    cursor: pointer;
    font-size: inherit;
    padding: 0;
}

.btn-link:hover {
    color: #764ba2;
}

/* FAQ CTA Section */
.faq-cta {
    text-align: center;
    padding: 3rem 0;
}

.faq-cta h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.faq-cta p {
    color: #555;
    margin-bottom: 2rem;
}

.faq-cta-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.faq-cta-note {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.back-to-top:active {
    transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .faq-hero h1 {
        font-size: 2rem;
    }

    .faq-intro {
        font-size: 1rem;
    }

    .faq-categories {
        gap: 0.5rem;
    }

    .faq-category-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    .faq-question {
        font-size: 1rem;
        padding: 1.25rem 1rem;
    }

    .faq-answer > * {
        padding: 0 1rem 1.25rem;
    }

    .faq-cta-links {
        flex-direction: column;
        align-items: center;
    }

    .faq-cta-links .btn {
        width: 100%;
        max-width: 300px;
    }

    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .faq-hero {
        padding: 3rem 0 2rem;
    }

    .faq-hero h1 {
        font-size: 1.75rem;
    }

    #faq-search {
        padding: 0.875rem 0.875rem 0.875rem 2.75rem;
        font-size: 0.95rem;
    }

    .search-icon {
        left: 0.875rem;
    }

    .faq-main {
        padding: 2rem 0;
    }

    .faq-question {
        font-size: 0.95rem;
        padding: 1rem 0.75rem;
    }

    .faq-icon {
        width: 20px;
        height: 20px;
    }

    .faq-answer > * {
        padding: 0 0.75rem 1rem;
    }

    .faq-answer p,
    .faq-answer ul,
    .faq-answer ol {
        font-size: 0.95rem;
    }
}

/* Print Styles */
@media print {
    .faq-hero,
    .faq-categories,
    .faq-search-container,
    .back-to-top,
    .faq-cta {
        display: none;
    }

    .faq-item {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .faq-question {
        background: #f8f9fa !important;
    }

    .faq-answer {
        max-height: none !important;
        display: block !important;
    }

    .faq-icon {
        display: none;
    }
}
