/* FAQ Page Styles */

/* Container */
.faq-container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
    min-height: 100vh;
}

/* Back Button */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 1.5rem;
    transition: color 0.3s ease;
}

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

/* Page Header */
.faq-container h1 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.faq-container > p {
    color: #666;
    font-size: 1rem;
    margin-bottom: 2rem;
}

/* Search Section */
.faq-search-container {
    position: relative;
    margin-bottom: 2rem;
}

#faqSearch {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: white;
}

#faqSearch:focus {
    border-color: #667eea;
    outline: none;
}

.faq-search-container i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 1rem;
}

/* Category Tabs */
.faq-categories {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.category-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    color: #666;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

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

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

/* FAQ Items */
.faq-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

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

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

/* Question Button */
.faq-question {
    width: 100%;
    padding: 1.5rem;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    transition: color 0.3s ease;
}

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

.faq-question span {
    flex: 1;
    margin-right: 1rem;
}

.faq-question i {
    transition: transform 0.3s ease;
    color: #667eea;
    font-size: 1rem;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

/* Answer Section */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0 1.5rem;
}

.faq-item.active .faq-answer {
    max-height: 1000px;
    padding: 0 1.5rem 1.5rem;
}

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

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

.faq-answer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.faq-answer a:hover {
    text-decoration: underline;
}

.faq-answer ul,
.faq-answer ol {
    margin-left: 1.5rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

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

.faq-answer strong {
    color: #333;
}

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

.no-results i {
    font-size: 3rem;
    color: #e2e8f0;
    margin-bottom: 1rem;
}

.no-results h3 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.no-results p {
    font-size: 1rem;
    margin: 0;
}

/* Contact Section */
.faq-contact {
    margin-top: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 12px;
    text-align: center;
    color: white;
}

.faq-contact h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.faq-contact p {
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.faq-contact .contact-email {
    margin-top: 1rem;
    margin-bottom: 0;
    font-size: 0.9rem;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    background: white;
    color: #667eea;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s ease;
}

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

.faq-contact a {
    color: white;
    text-decoration: underline;
}

.faq-contact a:hover {
    color: #f0f0f0;
}

/* Search Highlighting */
.highlight {
    background: #fff3cd;
    padding: 0 0.25rem;
    border-radius: 3px;
}

/* Loading State */
.faq-items.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.faq-item {
    animation: fadeIn 0.3s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .faq-container {
        padding: 1rem;
        margin: 1rem auto;
    }
    
    .faq-categories {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .category-btn {
        width: 100%;
        text-align: center;
    }
    
    .faq-question {
        font-size: 1rem;
        padding: 1rem;
    }
    
    .faq-answer {
        padding: 0 1rem;
    }
    
    .faq-item.active .faq-answer {
        padding: 0 1rem 1rem;
    }
    
    .faq-contact {
        padding: 1.5rem;
    }
    
    .contact-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
    
    #faqSearch {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

@media (max-width: 480px) {
    .faq-container h1 {
        font-size: 1.5rem;
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .faq-question {
        padding: 0.75rem;
        font-size: 0.95rem;
    }
    
    .faq-answer {
        padding: 0 0.75rem;
    }
    
    .faq-item.active .faq-answer {
        padding: 0 0.75rem 0.75rem;
    }
    
    .no-results {
        padding: 2rem 1rem;
    }
    
    .no-results i {
        font-size: 2rem;
    }
    
    .no-results h3 {
        font-size: 1.25rem;
    }
}

/* Print Styles */
@media print {
    .faq-search-container,
    .faq-categories,
    .faq-contact,
    .back-btn {
        display: none;
    }
    
    .faq-item {
        box-shadow: none;
        border: 1px solid #e2e8f0;
        margin-bottom: 1rem;
        break-inside: avoid;
    }
    
    .faq-answer {
        max-height: none !important;
        padding: 0 1rem 1rem !important;
    }
    
    .faq-question i {
        display: none;
    }
}
