/* FAQ Archive Styles */
.faq-archive {
    padding: 2rem 0;
    min-height: 60vh;
}

.faq-archive .page-header {
    text-align: center;
    margin-bottom: 3rem;
    background-color: #D9D2FF;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    border-radius: 24px;
}

.faq-archive .page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 1rem;
}

.faq-archive .page-description {
    font-size: 1.125rem;
    color: #000000;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* FAQ Content Layout */
.faq-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

@media (max-width: 1024px) {
    .faq-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Sidebar Styles */
.faq-sidebar {
    position: sticky;
    top: 2rem;
    height: fit-content;
}

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

.faq-search input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--ta-text-primary, #ffffff);
    font-size: 0.875rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.faq-search input:focus {
    outline: none;
    border-color: var(--ta-accent-purple, #8B5CF6);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
    background: rgba(255, 255, 255, 0.08);
}

.faq-search input::placeholder {
    color: var(--ta-text-secondary, #94A3B8);
}

.faq-search .search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ta-text-secondary, #94A3B8);
    pointer-events: none;
}

/* Categories Navigation */
.faq-categories h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--ta-text-primary, #ffffff);
    margin-bottom: 1rem;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    margin-bottom: 0.5rem;
}

.category-list > li.has-children {
    margin-bottom: 0.5rem;
}

.category-link {
    display: block;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: var(--ta-text-secondary, #94A3B8);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.category-link:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: #AA99FF;
    color: var(--ta-text-primary, #ffffff);
    transform: translateX(4px);
}

.category-link.active {
    border-color: #AA99FF;
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.25);
}

.faq-count {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.category-link.active .faq-count {
    background: rgba(255, 255, 255, 0.2);
}

.category-link-wrapper {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.category-link-wrapper:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: #AA99FF;
}

.category-link-wrapper .category-link {
    flex: 1;
    min-width: 0;
    padding: 0;
    background: none;
    border: none;
    border-radius: 0;
    backdrop-filter: none;
}

.category-link-wrapper .category-link:hover {
    background: none;
    border-color: transparent;
    transform: none;
}

.has-children.is-open > .category-link-wrapper,
.category-link-wrapper:has(.category-link.active) {
    border-color: #AA99FF;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.25);
}

.category-link-wrapper:has(.category-link.active) .category-link {
    color: #ffffff;
}

.category-toggle {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--ta-text-secondary, #94A3B8);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.category-toggle:hover {
    color: var(--ta-text-primary, #ffffff);
}

.category-toggle svg {
    transition: transform 0.3s ease;
}

.has-children.is-open > .category-link-wrapper .category-toggle svg {
    transform: rotate(180deg);
}

.category-children {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.has-children.is-open > .category-children {
    max-height: 500px;
}

.category-children li {
    margin-bottom: 0;
}

.category-children li:first-child {
    margin-top: 0.5rem;
}

.category-children .category-link {
    font-size: 0.8125rem;
    padding: 0.5rem 1rem;
    background: none;
    border: none;
    border-radius: 0;
    backdrop-filter: none;
}

.category-children .category-link:hover {
    background: none;
    border: none;
    transform: none;
    color: var(--ta-text-primary, #ffffff);
}

.category-children .category-link.active {
    color: #ffffff;
    box-shadow: none;
    border: none;
}

/* Loading State */
.faq-loading {
    text-align: center;
    padding: 3rem 0;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid var(--ta-accent-purple, #8B5CF6);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.faq-loading p {
    color: var(--ta-text-secondary, #94A3B8);
    font-size: 0.875rem;
}

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

.faq-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.faq-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #AA99FF;
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.faq-item.expanded {
    border-color: #AA99FF;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.15);
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    cursor: pointer;
    user-select: none;
}

.faq-question h3 {
    font-size: 20px;
    font-weight: 500;
    color: var(--ta-text-primary, #ffffff);
    margin: 0;
    line-height: 1.5;
    flex: 1;
    padding-right: 1rem;
    transition: all 0.1s ease-in-out;
}

.faq-item.expanded .faq-question h3 {
    color: #C8C8C8;
}

.faq-arrow {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ta-accent-purple, #8B5CF6);
    transition: transform 0.3s ease;
}

.faq-answer {
    display: none;
    padding: 0 1.5rem 1.5rem;
    opacity: 0;
    transform: translateY(-10px);
    font-size: 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

/* When FAQ is expanded via CSS class */
.faq-item.expanded .faq-answer {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

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

.answer-content {
    color: var(--ta-text-primary, #94A3B8);
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    padding: 0 1rem;
}

.answer-content p {
    margin-bottom: 0.5rem;
}

.answer-content ul, .answer-content ol {
    padding: 0 1rem;
}

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

.faq-meta {
    padding-top: 1rem;
    font-size: 0.875rem;
}

.faq-categories {
    color: var(--ta-text-secondary, #94A3B8);
}

.faq-categories a {
    color: var(--ta-accent-purple, #8B5CF6);
    text-decoration: none;
    font-weight: 500;
}

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

/* Pagination */
.faq-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.page-btn {
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--ta-text-secondary, #94A3B8);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--ta-text-primary, #ffffff);
}

.page-btn.active {
    background: var(--ta-accent-purple, #8B5CF6);
    border-color: var(--ta-accent-purple, #8B5CF6);
    color: #ffffff;
}

.page-ellipsis {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.25rem;
    color: var(--ta-text-secondary, #94A3B8);
    font-size: 0.875rem;
}

/* No FAQs State */
.no-faqs {
    text-align: center;
    padding: 3rem 0;
}

.no-faqs h3 {
    font-size: 1.5rem;
    color: var(--ta-text-primary, #ffffff);
    margin-bottom: 1rem;
}

.no-faqs p {
    color: var(--ta-text-secondary, #94A3B8);
    font-size: 1rem;
    line-height: 1.6;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .faq-archive {
        padding: 1rem 0;
    }
    
    .faq-archive .page-title {
        font-size: 2rem;
    }
    
    .faq-archive .page-description {
        font-size: 1rem;
    }
    
    .faq-content {
        gap: 1.5rem;
    }
    
    .faq-sidebar {
        position: static;
        order: 1;
    }
    
    .faq-main {
        order: 2;
    }
    
    .faq-question {
        padding: 1rem;
    }
    
    .faq-question h3 {
        font-size: 16px;
    }

    .faq-item.expanded .faq-question h3 {
        font-size: 14px;
    }
    
    .faq-answer {
        padding: 0 1rem 1rem;
        font-size: 16px;
    }
}