/* ========================
   FAQ Page Styles
   ======================== */

/* FAQ Search Section */
.faq-search-section {
    margin-bottom: 3rem;
}

.faq-search-container {
    max-width: 600px;
    margin: 0 auto;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 1rem;
    color: var(--theme-gray-medium);
    font-size: 1.25rem;
    z-index: 2;
}

.faq-search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    background: var(--theme-white);
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.faq-search-input:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(234, 96, 4, 0.1);
}

.faq-search-input::placeholder {
    color: var(--theme-gray-medium);
}

.clear-search-btn {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: var(--theme-gray-medium);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50%;
    transition: all 0.2s ease;
    z-index: 2;
}

.clear-search-btn:hover {
    color: var(--primary-orange);
    background: rgba(234, 96, 4, 0.1);
}

/* FAQ Container */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* FAQ Item Styles */
.faq-item {
    background: var(--theme-white);
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.faq-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-orange);
}

.faq-item.active {
    border-color: var(--primary-orange);
    box-shadow: 0 4px 12px rgba(234, 96, 4, 0.15);
}

.faq-question {
    width: 100%;
    padding: 1.5rem;
    background: none;
    border: none;
    text-align: left;
    font-family: 'Poppins', sans-serif;
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
}

.faq-question:hover {
    color: var(--primary-orange);
}

.faq-question:focus {
    outline: 2px solid var(--primary-orange);
    outline-offset: -2px;
}

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

.faq-toggle-icon {
    font-size: 1.5rem;
    color: var(--primary-orange);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.faq-item.active .faq-toggle-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background: #f9fafb;
}

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

.faq-answer-content {
    padding-top: 0.5rem;
    font-size: 1rem;
    line-height: 1.6;
    color: #6b7280;
}

/* Search Highlighting */
.highlight {
    background: rgba(234, 96, 4, 0.2);
    color: var(--primary-orange-dark);
    font-weight: 500;
    padding: 0.1rem 0.2rem;
    border-radius: 3px;
}

/* No Results Message */
.no-results-message {
    text-align: center;
    padding: 3rem 1rem;
    background: var(--theme-white);
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.no-results-icon {
    font-size: 3rem;
    color: var(--theme-gray-medium);
    margin-bottom: 1rem;
}

.no-results-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.no-results-text {
    font-size: 1rem;
    color: var(--theme-gray);
    line-height: 1.6;
}

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

.faq-cta-content {
    max-width: 600px;
    margin: 0 auto;
}

.faq-cta-title {
    font-size: 2rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 1rem;
}

.faq-cta-description {
    font-size: 1.125rem;
    color: var(--theme-gray);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.faq-cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Responsive Design */
@media (max-width: 768px) {
    .faq-search-input {
        padding: 0.875rem 0.875rem 0.875rem 2.75rem;
        font-size: 0.9rem;
    }
    
    .search-icon {
        left: 0.875rem;
        font-size: 1.125rem;
    }
    
    .clear-search-btn {
        right: 0.875rem;
        font-size: 1.125rem;
    }
    
    .faq-question {
        padding: 1.25rem;
        font-size: 1rem;
    }
    
    .faq-question-text {
        margin-right: 0.75rem;
    }
    
    .faq-toggle-icon {
        font-size: 1.25rem;
    }
    
    .faq-item.active .faq-answer {
        padding: 0 1.25rem 1.25rem 1.25rem;
    }
    
    .faq-answer-content {
        font-size: 0.9rem;
    }
    
    .faq-cta-title {
        font-size: 1.75rem;
    }
    
    .faq-cta-description {
        font-size: 1rem;
    }
    
    .faq-cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .faq-cta-buttons .btn {
        width: 100%;
        max-width: 280px;
    }
}

@media (max-width: 480px) {
    .faq-search-section {
        margin-bottom: 2rem;
    }
    
    .faq-question {
        padding: 1rem;
        font-size: 0.95rem;
    }
    
    .faq-item.active .faq-answer {
        padding: 0 1rem 1rem 1rem;
    }
    
    .faq-cta-section {
        padding: 2rem 1rem;
    }
    
    .faq-cta-title {
        font-size: 1.5rem;
    }
}

/* Animation for FAQ items appearing */
.faq-item {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
}

.faq-item:nth-child(1) { animation-delay: 0.1s; }
.faq-item:nth-child(2) { animation-delay: 0.2s; }
.faq-item:nth-child(3) { animation-delay: 0.3s; }
.faq-item:nth-child(4) { animation-delay: 0.4s; }
.faq-item:nth-child(5) { animation-delay: 0.5s; }
.faq-item:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Smooth transitions for filtering */
.faq-item.filtered-out {
    opacity: 0;
    transform: scale(0.95);
    max-height: 0;
    margin: 0;
    padding: 0;
    border: none;
    transition: all 0.3s ease;
}

.faq-item.filtered-in {
    opacity: 1;
    transform: scale(1);
    transition: all 0.3s ease;
}