/* FAQ Page — Modern Accordion Design
   Clean, minimalist accordion with hidden answers and modern styling
*/

/* Layout */
.faq-page-content .faqs { 
    padding: 0; 
}

.faq-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 2.5rem;
    max-width: 1200px;
    margin: 2rem auto 0;
    padding: 0 1rem;
}

@media (max-width: 1024px) {
    .faq-grid { 
        grid-template-columns: 1fr; 
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .faq-grid { 
        padding: 0 1rem;
    }
}

/* Main column */
.faq-main { 
    min-width: 0;
}

.faq-intro {
    margin-bottom: 2rem;
}

.faq-intro h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.faq-intro p {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* FAQ Item Styling */
.faq-item {
    background: var(--white);
    border: 1px solid #e8e8f0;
    border-radius: 10px;
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 280ms cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.faq-item.open {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-color);
}

/* Question Header */
.faq-question {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem;
    cursor: pointer;
    user-select: none;
    background: var(--white);
    transition: background-color 220ms ease;
    min-width: 0;
}

.faq-item:hover .faq-question {
    background-color: #f9f9fd;
}

.faq-item.open .faq-question {
    background-color: #f5f3ff;
}

.faq-number {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--white);
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
}

.faq-text {
    flex: 1;
    min-width: 0;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-dark);
    line-height: 1.5;
    word-break: break-word;
}

.faq-question i {
    flex-shrink: 0;
    color: var(--primary-color);
    font-size: 0.9rem;
    transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.open .faq-question i {
    transform: rotate(180deg);
}

/* Answer Section (Hidden by default) */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    background: #fafbff;
    padding: 0;
    transition: max-height 300ms cubic-bezier(0.4, 0, 0.2, 1),
                padding 300ms cubic-bezier(0.4, 0, 0.2, 1);
    border-top: 0;
}

.faq-item.open .faq-answer {
    max-height: 2000px;
    padding: 0 1.5rem 1.5rem 1.5rem;
    border-top: 1px solid #e8e8f0;
}

.faq-answer-content {
    color: var(--text-light);
    line-height: 1.8;
    font-size: 0.95rem;
}

.faq-answer-content p {
    margin-bottom: 0.75rem;
}

.faq-answer-content p:last-child {
    margin-bottom: 0;
}

.faq-answer-content strong {
    color: var(--text-dark);
    font-weight: 600;
}

/* Sidebar */
.faq-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Search Box */
.faq-search {
    position: sticky;
    top: 1rem;
}

.faq-search input[type="search"],
.faq-search input {
    width: 100%;
    padding: 0.95rem 1.15rem;
    border-radius: 10px;
    border: 1px solid #e8e8f0;
    background: var(--white);
    font-size: 0.95rem;
    color: var(--text-dark);
    transition: all 220ms ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.faq-search input[type="search"]:focus,
.faq-search input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.1);
}

.faq-search input[type="search"]::placeholder {
    color: #999;
}

/* CTA Box */
.faq-cta {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--white);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(var(--primary-color-rgb), 0.25);
    text-align: center;
}

.faq-cta h4 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--white);
}

.faq-cta p {
    font-size: 0.9rem;
    opacity: 0.95;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.faq-cta .btn {
    width: 100%;
    background: var(--white);
    color: var(--primary-color);
    font-weight: 600;
    border: none;
    transition: all 220ms ease;
}

.faq-cta .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Loading State */
.loading {
    text-align: center;
    padding: 3rem 1rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e8e8f0;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .faq-sidebar {
        gap: 1rem;
    }
    
    .faq-search {
        position: static;
    }
    
    .faq-question {
        padding: 1.25rem;
        gap: 1rem;
    }
    
    .faq-number {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
    
    .faq-text {
        font-size: 0.95rem;
    }
}

/* Accessibility helpers */
.visually-hidden { 
    position: absolute; 
    width: 1px; 
    height: 1px; 
    margin: -1px; 
    overflow: hidden; 
    clip: rect(0, 0, 0, 0);
}
