/* FAQ Page Styling for SafeDown */

.faq-container {
    max-width: 900px;
    margin: 0 auto;
}

/* FAQ accordion styling */
.faq-item {
    margin-bottom: 1.2rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
    background-color: white;
}

.faq-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.faq-question {
    padding: 1.5rem;
    background-color: white;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.faq-question:hover {
    background-color: #f8f9fa;
}

/* FAQ question toggle icon */
.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 300;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question::after {
    content: '−';
    transform: rotate(180deg);
}

/* FAQ answer styling */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 1.5rem;
}

.faq-item.active .faq-answer {
    max-height: 1000px; /* Arbitrary large value to allow expansion */
    padding: 0 1.5rem 1.5rem 1.5rem;
}

.faq-answer-content {
    color: var(--text-color);
    line-height: 1.6;
}

.faq-answer-content p {
    margin-bottom: 1rem;
}

.faq-answer-content p:last-child {
    margin-bottom: 0;
}

/* FAQ category styling */
.faq-category {
    margin-bottom: 3rem;
}

.faq-category-title {
    font-size: 1.6rem;
    color: var(--primary-color);
    margin-bottom: 1.2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    position: relative;
}

.faq-category-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--gradient-primary);
}

/* FAQ category icon */
.faq-category-icon {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    margin-right: 0.8rem;
}

/* FAQ search section */
.faq-search-container {
    margin-bottom: 2.5rem;
}

.faq-search {
    display: flex;
    width: 100%;
    max-width: 600px;
    margin: 0 auto 2rem auto;
}

.faq-search input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e0e5ec;
    border-radius: 30px 0 0 30px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.faq-search input:focus {
    border-color: var(--primary-color);
}

.faq-search button {
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 0 30px 30px 0;
    padding: 0 1.5rem;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.faq-search button:hover {
    opacity: 0.9;
}

/* No results message */
.faq-no-results {
    text-align: center;
    padding: 2rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    color: var(--text-color);
    display: none;
}

/* Responsive styles */
@media (max-width: 768px) {
    .faq-question {
        font-size: 1rem;
        padding: 1.2rem;
    }
    
    .faq-item.active .faq-answer {
        padding: 0 1.2rem 1.2rem 1.2rem;
    }
    
    .faq-category-title {
        font-size: 1.4rem;
    }
}
